Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing snapd can hide dpkg prompts and make it look like it's stuck #54

Closed
panlinux opened this issue Aug 17, 2017 · 4 comments
Closed

Comments

@panlinux
Copy link
Contributor

panlinux commented Aug 17, 2017

I tried to enable livepatch on a trusty machine, but it got stuck:

ubuntu@61-b1:~$ sudo ubuntu-advantage enable-livepatch <redacted>
Installing missing dependency snapd... 

Behind the scenes, what happened is that dpkg issued a prompt:

2228 pts/0    S+     0:00  |           \_ sudo ubuntu-advantage enable-livepatch redacted
2229 pts/0    S+     0:00  |               \_ /bin/sh -e /usr/bin/ubuntu-advantage enable-livepatch redacted
2236 pts/0    S+     0:01  |                   \_ apt-get install -y snapd
3269 pts/0    S+     0:00  |                       \_ /usr/bin/dpkg --status-fd 43 --configure liblzo2-2:amd64 libsystemd-journal0:amd64 linux-image-4.4.0-92-generic:amd64 linux-image-extra-4.4.0-92-generic:amd64 linux-image-generic-lts-xenial:amd64 linux-headers-4.4.0-92:all linux-headers-4.4.0-92-generic:amd64 linux-headers-generic-lts-xenial:amd64 linux-generic-lts-xenial:amd64 cgroup-lite:all squashfs-tools:amd64 systemd:amd64 snapd:amd64 thermald:amd64
3278 pts/0    S+     0:00  |                           \_ /usr/bin/perl /var/lib/dpkg/info/linux-image-4.4.0-92-generic.postinst configure 
3304 pts/0    S+     0:00  |                               \_ run-parts --verbose --exit-on-error --arg=4.4.0-92-generic --arg=/boot/vmlinuz-4.4.0-92-generic /etc/kernel/postinst.d
11905 pts/0    S+     0:00  |                                   \_ /usr/bin/perl -w /usr/share/debconf/frontend /usr/sbin/update-grub-legacy-ec2
11911 pts/0    S+     0:00  |                                       \_ /bin/bash /usr/sbin/update-grub-legacy-ec2
12312 pts/0    S+     0:00  |                                       |   \_ /bin/bash /usr/bin/ucf --debconf-ok --debconf-template grub/update_grub_changeprompt_threeway --three-way /tmp/filez4NBAU /var/run/grub/menu.lst
12362 pts/0    S+     0:00  |                                       \_ whiptail --backtitle Package configuration --title  --output-fd 11 --nocancel --default-item keep the local version currently installed --menu A new version of /boot/grub/menu.lst is available, but the version installed currently has been locally modified.  What would you like to do about menu.lst? 17 118 7 -- install the package maintainer's version  keep the local version currently installed  show the differences between the versions  show a side-by-side difference between the versions  show a 3-way difference between available versions  do a 3-way merge between available versions (experimental)  start a new shell to examine the situation 

Hitting ENTER at the stuck screen accepted whatever was the default choice and moved on.

Note that this can happen in any Ubuntu release, not just trusty.

@panlinux panlinux changed the title Installing snapd on trusty got stuck Installing snapd can hide dpkg prompts and seem to get stuck Aug 17, 2017
@panlinux panlinux changed the title Installing snapd can hide dpkg prompts and seem to get stuck Installing snapd can hide dpkg prompts and make it look like it's stuck Aug 17, 2017
@panlinux
Copy link
Contributor Author

panlinux commented Sep 1, 2017

The trick we have used elsewhere (in Landscape, for example) is:

DEBIAN_FRONTEND=noninteractive \
    sudo apt-get -y -o Dpkg::Options::='--force-confold' install $packages

@sparkiegeek
Copy link

We should be careful about doing that for menu.lst though - we (obviously) want the 4.x kernel to be booted

@panlinux
Copy link
Contributor Author

panlinux commented Sep 1, 2017

FWIW just hitting ENTER at that stalled terminal did the right thing, so whatever the proposed default was, it was correct. I think adding a new kernel is done via postinst scripts and update- calls, not by providing a new config file.

panlinux added a commit to panlinux/ubuntu-advantage-client that referenced this issue Sep 1, 2017
panlinux added a commit to panlinux/ubuntu-advantage-client that referenced this issue Sep 1, 2017
@yannrichet
Copy link

Hi,

using landscape (free version 17.03), I still have the problem when trying to install (through a package profile) some "partner" packages.
For instance, I activated partner in apt.conf client-side, and when adding default-jre-headless to the package profile (landscape server-side), it leads to downlaod and install ibm java, which requires a license agreement (client-side).
Then the package profile apply task returns an error due to this license agreement not satisfied...
(I finally turn around using openjdk explicitely)

Best regards,

Yann

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants