docker-archive / for-azure

27 stars 18 forks source link

Installing git removes sudo and other packages #10

Open markvr opened 7 years ago

markvr commented 7 years ago

Expected behavior

Git to be installed, and no other changes.

Actual behavior

sudo, bash and other critical packages are removed. This is pretty fatal, and requires reimaging the host from the Azure portal, and rejoining it to the swarm.

Information

swarm-manager000000:~$ docker-diagnose
OK hostname=swarm-manager000000 session=1488383469-FivOCmxzAQA589aYV0tiX5uTSKawYLwI
OK hostname=swarm-manager000001 session=1488383469-FivOCmxzAQA589aYV0tiX5uTSKawYLwI
OK hostname=swarm-manager000002 session=1488383469-FivOCmxzAQA589aYV0tiX5uTSKawYLwI
OK hostname=swarm-worker000000 session=1488383469-FivOCmxzAQA589aYV0tiX5uTSKawYLwI
Done requesting diagnostics.
Your diagnostics session ID is 1488383469-FivOCmxzAQA589aYV0tiX5uTSKawYLwI
Please provide this session ID to the maintainer debugging your issue.

Steps to reproduce the behavior

run sudo apk add git

The output of this is:

swarm-manager000000:~$ sudo apk add git
(1/60) Purging bash (4.3.46-r4)
Executing bash-4.3.46-r4.pre-deinstall
(2/60) Purging openssh (7.4_p1-r0)
(3/60) Purging openssh-sftp-server (7.4_p1-r0)
(4/60) Purging sudo (1.8.19_p1-r0)
(5/60) Purging gawk (4.1.4-r0)
(6/60) Purging ifupdown (0.7.53.1-r1)
(7/60) Purging net-tools (1.60_git20140218-r1)
(8/60) Purging mii-tool (1.60_git20140218-r1)
(9/60) Purging openssl (1.0.2j-r2)
(10/60) Purging parted (3.2-r5)
(11/60) Purging py2-pip (9.0.0-r0)
(12/60) Purging rsyslog (8.20.0-r1)
(13/60) Purging supervisor (3.2.0-r0)
(14/60) Purging py-meld3 (1.0.2-r0)
(15/60) Purging py-setuptools (29.0.1-r0)
(16/60) Purging python2 (2.7.13-r0)
(17/60) Purging util-linux (2.28.2-r1)
(18/60) Purging findmnt (2.28.2-r1)
(19/60) Installing busybox-initscripts (3.0-r8)
Executing busybox-initscripts-3.0-r8.post-install
(20/60) Installing libcap (2.25-r1)
(21/60) Installing chrony (2.4-r0)
Executing chrony-2.4-r0.pre-install
(22/60) Installing keyutils-libs (1.5.9-r1)
(23/60) Installing krb5-conf (1.0-r1)
(24/60) Installing libcom_err (1.43.3-r0)
(25/60) Installing libverto (0.2.5-r0)
(26/60) Installing krb5-libs (1.14.3-r1)
(27/60) Installing talloc (2.1.8-r0)
(28/60) Installing cifs-utils (6.6-r0)
(29/60) Installing dhcpcd (6.11.5-r0)
(30/60) Installing e2fsprogs-libs (1.43.3-r0)
(31/60) Installing e2fsprogs (1.43.3-r0)
(32/60) Installing e2fsprogs-extra (1.43.3-r0)
(33/60) Installing fuse (2.9.7-r0)
(34/60) Installing hvtools (4.4.15-r0)
(35/60) Installing libmnl (1.0.4-r0)
(36/60) Installing libnftnl-libs (1.0.7-r0)
(37/60) Installing iptables (1.6.0-r0)
(38/60) Installing openrc (0.21.7-r4)
Executing openrc-0.21.7-r4.post-install
(39/60) Installing strace (4.14-r0)
(40/60) Installing sysklogd (1.5.1-r0)
(41/60) Installing xz-libs (5.2.2-r1)
(42/60) Installing xz (5.2.2-r1)
(43/60) Purging readline (6.3.008-r4)
(44/60) Purging ncurses-libs (6.0-r7)
(45/60) Purging ncurses-terminfo (6.0-r7)
(46/60) Purging ncurses-terminfo-base (6.0-r7)
(47/60) Purging libssl1.0 (1.0.2j-r2)
(48/60) Purging libcrypto1.0 (1.0.2j-r2)
(49/60) Purging device-mapper-libs (2.02.168-r3)
(50/60) Purging libbz2 (1.0.6-r5)
(51/60) Purging libffi (3.2.1-r2)
(52/60) Purging gdbm (1.12-r0)
(53/60) Purging sqlite-libs (3.15.2-r0)
(54/60) Purging libestr (0.1.10-r0)
(55/60) Purging libfastjson (0.99.4-r0)
(56/60) Purging libgcrypt (1.7.3-r0)
(57/60) Purging libgpg-error (1.24-r0)
(58/60) Purging liblogging (1.0.5-r1)
(59/60) Purging libnet (1.1.6-r2)
(60/60) Purging libmount (2.28.2-r1)
Executing busybox-1.25.1-r0.trigger
Executing ca-certificates-20161130-r0.trigger
OK: 38 MiB in 50 packages

swarm-manager000000:~$ sudo
-sh: sudo: not found
ddebroy commented 7 years ago

Thanks for reporting this issue. This is happening because the bash package shipped has become out of date is getting purged which is also causing sudo to get purged. A workaround for now: before invoking any sudo apk add operations, invoke sudo apk add sudo

miholeus commented 7 years ago

+1 deleted all packages

FrenchBen commented 7 years ago

@miholeus Our latest RC has a fix for this.

miholeus commented 7 years ago

@FrenchBen great! Do you have any idea when it will be available on Azure?