Bug 50759 - univention-cloud-init no longer works: Missing Python 3 migration
univention-cloud-init no longer works: Missing Python 3 migration
Status: NEW
Product: UCS
Classification: Unclassified
Component: cloud-init
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-30 10:19 CET by Philipp Hahn
Modified: 2020-07-29 11:29 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.103
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): API change, External feedback, Large environments
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2020-01-30 10:19:52 CET
1. Missing dependency "cloud-init" -> "python3-oathlib" -> "python3-blinker" (see bug #46294 comment 3)
2. "cloud-init" is "Python 3" since UCS-4.3, while "univention-cloud-init" still installes to "Python 2" cp /usr/lib/python2.7/dist-packages/cloudinit/config/cc_ucs_setup.py 

Work-around: enable unmaintained (see Bug #39038) +
  cp /usr/lib/python2.7/dist-packages/cloudinit/config/cc_ucs_setup.py /usr/lib/python3/dist-packages/cloudinit/config/
Comment 1 Philipp Hahn univentionstaff 2020-01-30 10:54:10 CET
GOTCHA: "univention-cloud-init" does NOT call "/usr/lib/univention-system-setup/scripts/setup-join.sh" by itself; it ONLY writes the profile to "/var/cache/univention-system-setup/profile"!

Reading <https://docs.software-univention.de/installation.html#appliance:use:cloudinit> you also can/should provide two other files
  /var/cache/univention-system-setup/license
  /var/cache/univention-system-setup/installapps
before calling "setup-join.sh".
It would be good if u-c-i would support that as well AND would call "s-j.sh" itself!
Comment 2 Philipp Hahn univentionstaff 2020-01-30 14:41:10 CET
(In reply to Philipp Hahn from comment #1)
> GOTCHA: "univention-cloud-init" does NOT call
> "/usr/lib/univention-system-setup/scripts/setup-join.sh" by itself; it ONLY
> writes the profile to "/var/cache/univention-system-setup/profile"!

It is more subtile than that: "setup-join.sh" is called by "/etc/init.d/univention-cloud.init", but that declares no dependency on "cloud-init" and thus is reordered by systemd to be started in *parallel* with it; this leads to the profile not yet being written and u-c-i skipping the call:

debian/rules:
 41 »···dh_installinit -punivention-cloud-init --no-start -u"defaults 95"


# ls -1 /etc/init.d/*cloud* /etc/rc2.d/*cloud*
/etc/init.d/cloud-config
/etc/init.d/cloud-final
/etc/init.d/cloud-init
/etc/init.d/cloud-init-local
/etc/init.d/univention-cloud-init
/etc/init.d/univention-cloud-init-prepare-boot <=== MISSING in rc2?
/etc/rc2.d/S01cloud-config
/etc/rc2.d/S01cloud-final
/etc/rc2.d/S01cloud-init
/etc/rc2.d/S01cloud-init-local
/etc/rc2.d/S01univention-cloud-init

# systemd-analyze blame
cloud-init-local.serivce →
cloud-init.service →
cloud-init.target →
( cloud-config.serive || univention-cloud-init.service ) →
cloud-final.service →
cloud-init.target


Fixed in branch <git:phahn/50759_cloud-init>
Comment 3 Florian Best univentionstaff 2020-02-01 09:02:13 CET
Does this have to do with Bug #49171 ?