← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1779847] [NEW] cloud-init 18.2/18.3 centos thinks its ubuntu

 

Public bug reported:

im using the copr repo for cloud-init on centos 7.
i tested the latest 18.2 version cloud-init-18.2+5.g01ff5c2e-1.el7.centos.noarch
and the nightly build from yesterday for the 18.3 version.

both have the problem that if i use package_update package_upgrade for
example apt is used instead of yum for installing packages.

in /var/log/cloud-init.log i found the following:


[root@SOLUTAPP020 log]# grep ubuntu cloud-init.log
2018-07-03 09:08:45,553 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>
2018-07-03 09:08:45,778 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>
2018-07-03 09:08:50,736 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>
2018-07-03 09:08:50,846 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>
2018-07-03 09:08:52,943 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>
2018-07-03 09:08:53,286 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>


--

that is my /etc/os-release

[root@SOLUTAPP020 log]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/";
BUG_REPORT_URL="https://bugs.centos.org/";

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"


--

as far as i understood the source code in stages.py and util.py is that
/etc/os-releases is used for determining the distro.

apparently this fails.

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1779847

Title:
  cloud-init 18.2/18.3 centos thinks its ubuntu

Status in cloud-init:
  New

Bug description:
  im using the copr repo for cloud-init on centos 7.
  i tested the latest 18.2 version cloud-init-18.2+5.g01ff5c2e-1.el7.centos.noarch
  and the nightly build from yesterday for the 18.3 version.

  both have the problem that if i use package_update package_upgrade for
  example apt is used instead of yum for installing packages.

  in /var/log/cloud-init.log i found the following:

  
  [root@SOLUTAPP020 log]# grep ubuntu cloud-init.log
  2018-07-03 09:08:45,553 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>
  2018-07-03 09:08:45,778 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>
  2018-07-03 09:08:50,736 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>
  2018-07-03 09:08:50,846 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>
  2018-07-03 09:08:52,943 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>
  2018-07-03 09:08:53,286 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>

  
  --

  that is my /etc/os-release

  [root@SOLUTAPP020 log]# cat /etc/os-release
  NAME="CentOS Linux"
  VERSION="7 (Core)"
  ID="centos"
  ID_LIKE="rhel fedora"
  VERSION_ID="7"
  PRETTY_NAME="CentOS Linux 7 (Core)"
  ANSI_COLOR="0;31"
  CPE_NAME="cpe:/o:centos:centos:7"
  HOME_URL="https://www.centos.org/";
  BUG_REPORT_URL="https://bugs.centos.org/";

  CENTOS_MANTISBT_PROJECT="CentOS-7"
  CENTOS_MANTISBT_PROJECT_VERSION="7"
  REDHAT_SUPPORT_PRODUCT="centos"
  REDHAT_SUPPORT_PRODUCT_VERSION="7"


  --

  as far as i understood the source code in stages.py and util.py is
  that /etc/os-releases is used for determining the distro.

  apparently this fails.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1779847/+subscriptions


Follow ups