Add a juju action to retrieve admin password

Bug #1907063 reported by Tom Haddon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-k8s-wordpress
Fix Released
Medium
Tom Haddon

Bug Description

Currently the instructions to retrieve the admin password for Wordpress are to run:

microk8s.kubectl exec -ti -n wordpress wordpress-operator-0 -- cat /root/initial.passwd

This should instead be possible via a juju action.

Related branches

Tom Haddon (mthaddon)
Changed in charm-k8s-wordpress:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Tom Haddon (mthaddon)
Revision history for this message
Tom Haddon (mthaddon) wrote :

This has been added, but we've introduced a problem as follows:

application-wordpress: 10:53:01 WARNING unit.wordpress/0.get-initial-password Traceback (most recent call last):
application-wordpress: 10:53:01 WARNING unit.wordpress/0.get-initial-password File "./src/charm.py", line 13, in <module>
application-wordpress: 10:53:01 WARNING unit.wordpress/0.get-initial-password from leadership import LeadershipSettings
application-wordpress: 10:53:01 WARNING unit.wordpress/0.get-initial-password File "/var/lib/juju/agents/unit-wordpress-0/charm/src/leadership.py", line 20, in <module>
application-wordpress: 10:53:01 WARNING unit.wordpress/0.get-initial-password from typing import Any, Iterable, Dict, MutableMapping, Protocol
application-wordpress: 10:53:01 WARNING unit.wordpress/0.get-initial-password ImportError: cannot import name 'Protocol'

The workload pod is on bionic, which doesn't support "Protocol". Need to confirm if it's possible to simply switch the image to focal, or whether we need to update the leadership library to deal with older versions of "typing".

Revision history for this message
Tom Haddon (mthaddon) wrote :

Now fixed by switching to a focal image.

Changed in charm-k8s-wordpress:
status: Confirmed → Fix Released
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.