Bug 50759 - univention-cloud-init no longer works: Missing Python 3 migration
univention-cloud-init no longer works: Missing Python 3 migration
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: cloud-init
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0-4
Assigned To: Philipp Hahn
Florian Best
: python3-migration
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-30 10:19 CET by Philipp Hahn
Modified: 2023-06-21 09:24 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 ?
Comment 5 Philipp Hahn univentionstaff 2021-12-14 14:34:52 CET
Be careful: When you install "cloud-init" this will create a user "debian" and will disable login for "root". When UCRV "auth/sshd/user/debian=yes" is not set explicitly you will not be able to login any longer.
Comment 6 Philipp Hahn univentionstaff 2023-04-18 11:15:05 CEST
univention-cloud-init is deprecated and no longer supported.

https://univention-dist-binpkg-webgui.k8s.knut.univention.de/source/univention-cloud-init/

[5.0-3] 9f610761a6 feat(cloud-init): Remove package
 .gitlab/CODEOWNERS                                              |   1 -
 base/univention-dvd/tasks/ucs504/task-ucs504                    |   1 -
 base/univention-errata-level/maintained-packages.txt            |   1 -
 base/univention-l10n-fr/all_targets.mk                          |   1 -
 .../var/www/univention/js/ci-appliance/fr.po                    |  50 ---------
 doc/ext-installation/appliance.rst                              |   2 +-
 services/univention-cloud-init/Makefile                         |  48 ---------
 services/univention-cloud-init/appliance-hooks.d/10_restart_umc |  37 -------
 .../etc/cloud/cloud.cfg.d/91-univention-cloud-init.cfg          | 105 -------------------
 services/univention-cloud-init/debian/changelog                 | 151 ----------------------------
 ...
 24 files changed, 1 insertion(+), 1027 deletions(-)
Comment 7 Florian Best univentionstaff 2023-04-20 22:28:16 CEST
No transitional package is needed as we don't expect anyone to have this installed?

TODO: remove from UCS 5.1, UCS 5.2.
Comment 8 Philipp Hahn univentionstaff 2023-05-24 15:03:38 CEST
(In reply to Florian Best from comment #7)
> No transitional package is needed as we don't expect anyone to have this
> installed?

Where would you transition to? /dev/null?
The package is broken since UCS 4.3-0 and was never usable since then.

> TODO: remove from UCS 5.1, UCS 5.2.

DONE: https://univention-dist-binpkg-webgui.k8s.knut.univention.de/source/univention-cloud-init/
Comment 9 Florian Best univentionstaff 2023-05-24 15:11:15 CEST
OK
Comment 10 Philipp Hahn univentionstaff 2023-06-21 09:24:42 CEST
UCS 5.0-4 has been released:
 https://docs.software-univention.de/release-notes/5.0-4/en/

If this error occurs again, please use the 'Clone This Bug' option.