Problem:
Trying to automate the deployment of the Katello tools and finding they fail in the last stages, when (other) cloud-init package installations work fine.
The pkg_manager template deals with the apt command used to install these packages. The relevant section there:
elif [ -f /etc/debian_version ]; then
PKG_MANAGER='apt-get'
PKG_MANAGER_INSTALL="${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' install -y"
PKG_MANAGER_REMOVE="${PKG_MANAGER} remove -y"
PKG_MANAGER_UPGRADE="${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y"
Expected outcome:
Apt package installations to work without issue after the Subscription manager is installed and the host is registered.
Foreman and Proxy versions:
Foreman v3.15
Foreman and Proxy plugin versions:
Katello v4.17
Distribution and version:
Deployed host: Ubuntu 22.04
Foreman server: CentOS Stream 9
Other relevant data:
Relevant log entries from /var/log/installer/installer-journal.txt
:
Jul 17 11:57:17 alma-goffer.ixbru.ipnexia.com subiquity_log.2015[48900]: The following additional packages will be installed:
Jul 17 11:57:17 alma-goffer.ixbru.ipnexia.com subiquity_log.2015[48900]: katello-upload-profile python3-katello-host-tools
Jul 17 11:57:17 alma-goffer.ixbru.ipnexia.com subiquity_log.2015[48900]: The following NEW packages will be installed:
Jul 17 11:57:17 alma-goffer.ixbru.ipnexia.com subiquity_log.2015[48900]: katello-host-tools katello-upload-profile python3-katello-host-tools
Jul 17 11:57:17 alma-goffer.ixbru.ipnexia.com subiquity_log.2015[48900]: 0 upgraded, 3 newly installed, 0 to remove and 49 not upgraded.
Jul 17 11:57:17 alma-goffer.ixbru.ipnexia.com subiquity_log.2015[48900]: Need to get 15.0 kB of archives.
Jul 17 11:57:17 alma-goffer.ixbru.ipnexia.com subiquity_log.2015[48900]: After this operation, 72.7 kB of additional disk space will be used.
Jul 17 11:57:17 alma-goffer.ixbru.ipnexia.com subiquity_log.2015[48900]: Get:1 https://oss.atix.de/Ubuntu22LTS stable/main amd64 katello-upload-profile all 1.30.5-2 [3626 B]
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48900]: Get:2 https://oss.atix.de/Ubuntu22LTS stable/main amd64 python3-katello-host-tools all 4.4.0-4 [9480 B]
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48900]: Get:3 https://oss.atix.de/Ubuntu22LTS stable/main amd64 katello-host-tools all 1.0-1 [1918 B]
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48909]: debconf: unable to initialize frontend: Dialog
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48909]: debconf: (TERM is not set, so the dialog frontend is not usable.)
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48909]: debconf: falling back to frontend: Readline
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48909]: debconf: unable to initialize frontend: Readline
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48909]: debconf: (This frontend requires a controlling tty.)
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48909]: debconf: falling back to frontend: Teletype
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48909]: dpkg-preconfigure: unable to re-open stdin:
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48900]: Fetched 15.0 kB in 0s (101 kB/s)
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48900]: E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48925]: dpkg: error: need an action option
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48925]: Type dpkg --help for help about installing and deinstalling packages [*];
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48925]: Use 'apt' or 'aptitude' for user-friendly package management;
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48925]: Type dpkg -Dhelp for a list of dpkg debug flag values;
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48925]: Type dpkg --force-help for a list of forcing options;
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48925]: Type dpkg-deb --help for help about manipulating *.deb files;
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48925]: Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
Jul 17 11:57:17 alma-goffer.domain.com subiquity_log.2015[48900]: E: Sub-process /usr/bin/dpkg returned an error code (2)
The /dev/pts
line appears to be a red herring: Bug #1901482 “E: Can not write log (Is /dev/pts mounted?) - posi...” : Bugs : subiquity package : Ubuntu
I don’t get the line dpkg: error: need an action option
, as the relevant template clearly includes the ‘install’ action.
What gives?!