Confusing error message if registration-key is set to the empty string: Need computer-title and juju-info to proceed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| landscape-client-charm |
High
|
Unassigned |
Bug Description
New deploys of cs:xenial/
Adam Collard (adam-collard) wrote : | #2 |
Sorry ignore the second paragraph in comment #1.
The charm requires the account-name configuration value to be set. Seeing the status log and configuration as per first paragraph remains useful.
Paul Gear (paulgear) wrote : | #3 |
Unit log of next attempt: https:/
python -c 'import socket; print(socket.
(FTR, computer-title is not a charm configuration option)
Changed in landscape-client-charm: | |
status: | Incomplete → New |
Paul Gear (paulgear) wrote : | #4 |
Workaround: setting ping-url & url explicitly to their default values rather than to empty strings.
tags: | added: canonical-is |
Paul Gear (paulgear) wrote : | #5 |
It seems this might be a juju 1 vs. juju 2 incompatibility; I compared with a previously-deployed version of the charm, and the only difference was in the saved persistent config: in the juju 1 config, "registration-key" was absent, whereas in juju 2 it was set to the empty string. I'm not sure if this is really a bug or should be considered a configuration error on my part, but it certainly is surprising.
summary: |
+ Confusing error message if registration-key is set to the empty string: Need computer-title and juju-info to proceed |
Andreas Hasenack (ahasenack) wrote : | #6 |
I also spent about 40min debugging a similar case.
My charm config had two mistakes:
a) registration_key set to "secret", but the server didn't require one. I think usually this would just be ignored and not be a fatal error
b) account_name was incorrect. This is indeed a fatal registration error.
Yet the error message I saw in juju status was the very much misleading "Need computer-title and juju-info" text, which sent me on a wild goose chase for quite some time. I even found RUN=0 in /etc/default/
Turns out all I had to do was set that to 1 and try "landscape-config --silent", which correctly diagnosed the issue for me:
root@clipper:~# landscape-config --silent
[ ok ] Restarting landscape-client (via systemctl): landscape-
Please wait...
Invalid account name or registration key.
That status message "Need computer-title and juju-info to proceed" is just a last resort "else:" clause and doesn't really mean what it says. It really means "Sorry, something else happened and I don't know what it is."
if is_configured_
if exit_code == 0:
else:
if not self.config.
else:
return 0
Same issue, but after to have fill in the parts on the charm, as suggested from official site (https:/
$: juju ssh ubuntu@node
and using the command reported on Landscape server:
$: sudo landscape-config --computer-title "My Web Server" --account-name standalone -p 128-qosk-7382 --url https:/
after few second the node is appeared on Landscape Server. I've also followed this guide
https:/
but I followed that from SSL cert
tags: | added: canonical-bootstack |
Xav Paice (xavpaice) wrote : | #8 |
I was getting this same problem, with a juju 2.2.3 setup and cs:landscape-
Found that setting url and ping-url by hand fixed it, but I had already added a relation between landscape-server and landscape-client, and I would fully expect the relation to populate that info without needing to configure after deployment.
Xav Paice (xavpaice) wrote : | #9 |
Just one update to that, only one computer actually registered OK. The remainder remained in the same state, but when I tried locally I wound up with:
landscape-config --silent
Restarting landscape-client (via systemctl): landscape-
Please wait...
The server's SSL information is incorrect, or fails signature verification!
If the server is using a self-signed certificate, please ensure you supply it with the --ssl-public-key parameter.
I would also expect the ssl cert to be passed by the relation.
Drew Freiberger (afreiberger) wrote : | #10 |
FYI, it appears that the relation of landscape-client to landscape-server for the promulgated charm versions is only to create a client on the landscape-server for registration, not to related the peer landscape-clients to the registration info of landscape-server. For this, we'd want to build and promulgate the new landscape-server code into an updated charm to provide the registration relation interface.
Changed in landscape-client-charm: | |
importance: | Undecided → High |
Vladimir Grevtsev (vlgrevtsev) wrote : | #11 |
Any updates on this?
It looks like it's still actual thing.
tags: | added: cpe-onsite |
Vern Hart (vern) wrote : | #12 |
We're seeing this on site at a customer (several customers, actually).
Checking /etc/landscape/
[client]
log_level = info
url = https:/
ping_url = http://
data_path = /var/lib/
account_name = standalone
disable_
monitor_plugins = ALL
computer_title = compute01
egress_subnets = 10.1.1.40/32
ingress_address = 10.1.1.40
private_address = 10.1.1.40
ssl_public_key = /etc/ssl/
In the crt file I see an ascii-armored cert, as I would expect.
However when I try to connect to that https url with curl I get an error with the cert:
$ curl --cacert /etc/ssl/
curl: (60) SSL certificate problem: self-signed certificate
More details here: https:/
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Checking that cert file on other units I see that it is the same on landscape-server/0 and landscape-server/2 but is different on landscape-server/1 and landscape-haproxy/0
In auditing the landscape-client units I find at least 4 different versions of landscape_
When I query with the following openssl command, I set yet ANOTHER certificate!
$ openssl s_client -showcerts -servername 10.1.1.42 -connect 10.1.1.42:443
I've no idea where this latest certificate came from but if I put it in /etc/ssl/
$ landscape-config --silent
[ ok ] Restarting landscape-client (via systemctl): landscape-
Please wait...
System successfully registered.
It would seem the relationship between landscape-server and landscape-client is passing around invalid certs. The haproxy charm (related to both landscape-server and landscape-client) is responsible for creating the cert and I only have one landscape-haproxy unit so I'd expect there to be only one certificate.
Perhaps landscape-server is also generating a cert? I'm not sure. What I do know is that there are at least 5 different certs in this deployment and none of the landscape-client or landscape-server or landscape-haproxy units have the one that works against the landscape url. Where does the working cert come from?
Vern Hart (vern) wrote : | #13 |
I suspect the predominant feeling is that this is not important since in a production deployment, a non-self-signed certificate will be created and assigned to landscape-haproxy, landscape-server, and landscape-client -- thereby bypassing this bug/issue. I would contend that if the certificate were shared correctly, the deployment experience would be better and less confusing.
At the very least, can we change the status message when the certificate is invalid?
Changed in landscape-client-charm: | |
status: | New → Confirmed |
tags: | added: sts |
David O Neill (dmzoneill) wrote : | #14 |
may help someone resolve landscape-clinet stuck in maintenance mode
JUJU_MODEL=
HAPROXY=
# Note landscape does not have HA Proxy VIP as in baremetal HA setup.
IP=$( juju status -m $JUJU_MODEL $HAPROXY --format json | jq -r '.machines[
Juju switch lma
juju ssh $HAPROXY "sudo openssl x509 -in /var/lib/
juju scp $HAPROXY:
# Run below for lma and k8s-tenant-1 models:
juju config -m <JUJU_MODEL> landscape-client \
url="https:/
ping-url="https:/
Ponnuvel Palaniyappan (pponnuvel) wrote : | #15 |
This issue still occurs as of juju version 2.7.6, landscape-client revision 33.
Would be useful to see "juju show-status-log landscape-client/1 -n 10000" so we get the fully history, and "juju config landscape-client" (with secrets scrubbed!) to see the config.
The computer-title prompt is about the juju config, not /etc/landscape/ client. conf (the charm will write it there)