Charm configs don't get updated in database

Bug #1682105 reported by Alvaro Uria
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Landscape Charm
Fix Released
Undecided
Unassigned
Landscape Server
Fix Released
Undecided
Unassigned

Bug Description

Some charm configurations don't get updated in the database after the initial deployment. Namely setting the following after a successful deploy:

* juju model-config http-proxy=http://my-little-proxy:8080/ https-proxy=http://my-little-proxy:8080/
* juju config landscape-server root-url=https://myscape/

Values appear in configuration files, but not in the database (system_configuration) and thus web UI.

Related branches

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Related, if not a duplicate: https://bugs.launchpad.net/landscape/+bug/1523950

Even when not deploying via the charm this issue is present.

Revision history for this message
Andrea Ieri (aieri) wrote :

Also to be considered: proxy variables can be set in either the legacy http-proxy / https-proxy variables or the charm-specific juju-http-proxy / juju-https-proxy. (at least) The latter set should be supported.
The workaround is to manually hack proxy variables in /opt/canonical/landscape/scripts/landscape-env.sh

Revision history for this message
Andrea Ieri (aieri) wrote :

Er... the workaround should be to manually edit /etc/environment, not /opt/canonical/landscape/scripts/landscape-env.sh

Revision history for this message
Andrea Ieri (aieri) wrote :

Another workaround is to set the proxy in the web GUI, under Settings -> Proxy for HTTP and HTTPS traffic (and restart)

Revision history for this message
semidark (nthomaier) wrote :

I edited the /etc/enviroment and added the Proxy entries as I need them.
also I added the Proxy Information in the Web GUI. Restarted everything...

But the update_security_db.sh is still failing.

When trying to download the Database File via wget on the console, everything is working fine.

So none of the Workarounds is working for me.

Changed in landscape-charm:
status: New → Confirmed
Revision history for this message
Simon Poirier (simpoir) wrote :

Setting in the GUI is most definitely not a workaround to the script errors, due to #1523950 .

Additionally, the current charms does honor http-proxy,https-proxy,no-proxy model settings on install. Setting prior to the deploy

  juju model-config http-proxy=http://my-little-proxy:8080/ https-proxy=http://my-little-proxy:8080/
  juju deploy landscape-scalable

I did get those values set correctly in the web UI without doing anything.

So the way I see it, what's missing is:

1) fixing the scripts through #1523950
2) adding a hook for config changes to possibly override values, although we don't currently do that for any config post-bootstrap

I'd flag this as duplicate if it were not for 2)

Simon Poirier (simpoir)
summary: - update_security_db.sh behind a proxy - http(s)_proxy charm setting(s)
- needed
+ Charm configs don't get updated in database
description: updated
Revision history for this message
Arif Ali (arif-ali) wrote :

We tried to the same thing with root-url today, as we had issues with SSL certs and such.

And this was resolved by updating the Root URL on the UI. However, we then tried to sort it out via the root-url configuration from he charm, it did not update it in the UI.

Looking through the code, it updates /etc/landscape/service.conf when root-url is changed, but doesn't update the Root URL on the UI. We were expecting that to change for us, rather than having to do it manually

Simon Poirier (simpoir)
Changed in landscape-charm:
status: Confirmed → In Progress
Changed in landscape-charm:
status: In Progress → Fix Committed
Simon Poirier (simpoir)
Changed in landscape-charm:
status: Fix Committed → Fix Released
Simon Poirier (simpoir)
Changed in landscape:
status: New → Fix Released
milestone: none → 19.10.7
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.