If upstream userdb server is not reachable by ssh, charm doesn't complete ssh configs and install hook fails

Bug #1937876 reported by Drew Freiberger
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
userdir-ldap-charms
Won't Fix
Low
Unassigned

Bug Description

When deploying in an airgapped environment, udldap charm fails at:

unit-ud-ldap-server-0: 20:04:03 WARNING unit.ud-ldap-server/0.install File "/var/lib/juju/agents/unit-ud-ldap-server-0/charm/hooks/install.real", line 66, in setup_udldap
unit-ud-ldap-server-0: 20:04:03 WARNING unit.ud-ldap-server/0.install utils.update_ssh_known_hosts(["userdb.internal", userdb_ip])
unit-ud-ldap-server-0: 20:04:03 WARNING unit.ud-ldap-server/0.install File "/var/lib/juju/agents/unit-ud-ldap-server-0/charm/hooks/utils.py", line 302, in update_ssh_known_hosts
unit-ud-ldap-server-0: 20:04:03 WARNING unit.ud-ldap-server/0.install subprocess.check_call(["/usr/bin/ssh-keyscan", "-t", "rsa"] + hosts, stdout=fp)
unit-ud-ldap-server-0: 20:04:03 WARNING unit.ud-ldap-server/0.install File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
unit-ud-ldap-server-0: 20:04:03 WARNING unit.ud-ldap-server/0.install raise CalledProcessError(retcode, cmd)
unit-ud-ldap-server-0: 20:04:03 WARNING unit.ud-ldap-server/0.install subprocess.CalledProcessError: Command '['/usr/bin/ssh-keyscan', '-t', 'rsa', 'userdb.internal', '<IP ADDRESS>']' returned non-zero exit status 1.

The rest of the install should complete so that local-only/manual rsync method can be used.

Revision history for this message
Drew Freiberger (afreiberger) wrote :

as a workaround, I added a 'try: except: pass' around line 302 in hooks/utils.py

Andrea Ieri (aieri)
Changed in charm-userdir-ldap:
status: New → Triaged
importance: Undecided → Low
information type: Proprietary → Public
Revision history for this message
Eric Chen (eric-chen) wrote :

This issue is pending for long time. If it is still valid, please open issue in
https://github.com/canonical/charm-userdir-ldap/

Changed in charm-userdir-ldap:
status: Triaged → Won't Fix
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.