gitlab has immutable configuration

Bug #1360458 reported by Matt Bruzek
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gitlab (Juju Charms Collection)
New
High
Helio Mota

Bug Description

I was testing the gitlab charm and noticed that it does not have a config-changed hook:

I: missing recommended hook config-changed

The config-changed hook is called when the Juju user calls juju set gitlab admin_password or any of the other configuration values. Since this file does not exist the configuration values are only set once. The configuration values are only read from db-relation-changed hook, so once the hook is fired these values will not be updated when the user calls 'juju set'

This breaks the user experience and should be fixed.

I suggest adding a config-changed hook and updating the values in the gitlab configuration as necessary.

Tags: audit
Matt Bruzek (mbruzek)
Changed in gitlab (Juju Charms Collection):
importance: Undecided → High
tags: added: audit
Helio Mota (helio-mota)
Changed in gitlab (Juju Charms Collection):
assignee: nobody → Helio Mota (helio-mota)
Revision history for this message
Martijn Evers (mevers) wrote :

For people like me. Who deployed the charm, made the relation and later realised they didn't known the password to login. I have a solution. Taken from the charm's 'db-relation-changed' hook, in the 'set_admin_password' function I extracted the follwing instruction:

1. login with 'juju ssh' on the unit.
2. execute the following code:
> admin_password=mypassword # change your password here
> echo `ruby -e 'require "bcrypt"; puts BCrypt::Password.create(ARGV[0], :cost => 10)' $admin_password`
3. copy the encrypted password returned by echo.
4. login on the mysql database find the correct schema/database (usually named: gitlab) and set the 'encrypted_password' field of a record in the 'users' table to the copied password from step 3.

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.