xcat2 / xcat-core

Code repo for xCAT core packages
Eclipse Public License 1.0
356 stars 170 forks source link

[fvt] It is not good idea to recommand customer to use xdsh to upgrage cumulus OS #4142

Open hu-weihua opened 6 years ago

hu-weihua commented 6 years ago

In our document Cumulus OS upgrade, xCAT recommend customer to use xdsh to upgrade cumulus OS like below:

xdsh switch1 'apt-get update && apt-get upgrade && reboot'

But when doing upgrade, the upgrade process will enter prompt mode, we will get below result:

[root@briggs01]# xdsh switch1 'apt-get update && apt-get upgrade && reboot'
mid05tor25: Get:1 http://172.11.253.27 CumulusLinux-3 InRelease [7,648 B]
mid05tor25: Get:2 http://172.11.253.27 CumulusLinux-3-security-updates InRelease [7,600 B]
mid05tor25: Get:3 http://172.11.253.27 CumulusLinux-3-updates InRelease [7,702 B]
mid05tor25: Get:4 http://172.11.253.27 CumulusLinux-3/cumulus Sources [20 B]
mid05tor25: Get:5 http://172.11.253.27 CumulusLinux-3/upstream Sources [209 kB]
mid05tor25: Get:6 http://172.11.253.27 CumulusLinux-3/cumulus armel Packages [30.3 kB]
mid05tor25: Get:7 http://172.11.253.27 CumulusLinux-3/upstream armel Packages [491 kB]
mid05tor25: Get:8 http://172.11.253.27 CumulusLinux-3-security-updates/cumulus Sources [20 B]
mid05tor25: Get:9 http://172.11.253.27 CumulusLinux-3-security-updates/upstream Sources [18.8 kB]
mid05tor25: Get:10 http://172.11.253.27 CumulusLinux-3-security-updates/cumulus armel Packages [20 B]
mid05tor25: Get:11 http://172.11.253.27 CumulusLinux-3-security-updates/upstream armel Packages [82.9 kB]
mid05tor25: Get:12 http://172.11.253.27 CumulusLinux-3-updates/cumulus Sources [17.6 kB]
mid05tor25: Get:13 http://172.11.253.27 CumulusLinux-3-updates/upstream Sources [210 kB]
mid05tor25: Get:14 http://172.11.253.27 CumulusLinux-3-updates/cumulus armel Packages [60.3 kB]
mid05tor25: Get:15 http://172.11.253.27 CumulusLinux-3-updates/upstream armel Packages [493 kB]
mid05tor25: Ign http://172.11.253.27 CumulusLinux-3/cumulus Translation-en_US
mid05tor25: Ign http://172.11.253.27 CumulusLinux-3/cumulus Translation-en
mid05tor25: Ign http://172.11.253.27 CumulusLinux-3/upstream Translation-en_US
mid05tor25: Ign http://172.11.253.27 CumulusLinux-3/upstream Translation-en
mid05tor25: Ign http://172.11.253.27 CumulusLinux-3-security-updates/cumulus Translation-en_US
mid05tor25: Ign http://172.11.253.27 CumulusLinux-3-security-updates/cumulus Translation-en
mid05tor25: Ign http://172.11.253.27 CumulusLinux-3-security-updates/upstream Translation-en_US
mid05tor25: Ign http://172.11.253.27 CumulusLinux-3-security-updates/upstream Translation-en
mid05tor25: Ign http://172.11.253.27 CumulusLinux-3-updates/cumulus Translation-en_US
mid05tor25: Ign http://172.11.253.27 CumulusLinux-3-updates/cumulus Translation-en
mid05tor25: Ign http://172.11.253.27 CumulusLinux-3-updates/upstream Translation-en_US
mid05tor25: Ign http://172.11.253.27 CumulusLinux-3-updates/upstream Translation-en
mid05tor25: Fetched 1,637 kB in 2s (655 kB/s)
mid05tor25: Reading package lists...
.....
mid05tor25:   quagga quagga-doc rsyslog sed snapper snmp snmpd snmptrapd sudo switchd
mid05tor25:   switchd-halbcm systemd systemd-sysv tcpdump tzdata udev vim-common vim-tiny
mid05tor25:   vrf wget
mid05tor25: 130 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
mid05tor25: Need to get 83.9 MB of archives.
mid05tor25: After this operation, 42.7 MB of additional disk space will be used.
mid05tor25: Do you want to continue? [Y/n] Abort.

I do not think this problem can be resolved by option -y. When run apt-get upgrade -y, it is also possible for customer to hit other prompts, such like below:

root@mid05tor25:~# apt-get upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  frr libc-ares2 linux-image-4.1.0-cl-6-iproc platform-modules-4.1.0-cl-6-iproc quagga-compat
The following packages will be upgraded:
  base-files bash bcm-sdk bind9-host bridge-utils ca-certificates clag cumulus-basefiles cumulus-image cumulus-net-snmp-addons cumulus-onie-firmware cumulus-platform cumulus-poe
......
Installing new version of config file /etc/e2fsck.conf ...
Installing new version of config file /etc/logrotate.conf.cumulus ...
Installing new version of config file /etc/logrotate.d/bootlog ...
Installing new version of config file /etc/logrotate.d/crit ...
Installing new version of config file /etc/profile.d/cl_license_motd.sh ...
Installing new version of config file /etc/profile.d/cl_support_motd.sh ...

Configuration file '/etc/rsyslog.d/99-syslog.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** 99-syslog.conf (Y/I/N/O/D/Z) [default=N] ? y
Installing new version of config file /etc/rsyslog.d/99-syslog.conf ...
Installing new version of config file /etc/security/limits.d/99-cumulus.conf ...
Installing new version of config file /etc/sysctl.d/arp.conf ...
.......
Processing triggers for initramfs-tools (0.120+deb8u3) ...
update-initramfs: Generating /boot/initrd.img-4.1.0-cl-6-iproc
Creating post-apt snapshot... 3 done.
*** System restart required ***

Is it possible for us to predict all kinds of prompt OS vendor will add in the further? If not, it is better to let customer has a chance to do what they want to do. Maybe let customer to login the switch to run apt-get upgrade manually is a better option.

hu-weihua commented 6 years ago

Related test task #4069

immarvin commented 6 years ago

DEBIAN_FRONTEND=noninteractive might prevent the such interaction

zet809 commented 6 years ago

So, we need to update the document, right? @immarvin