← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1411829] Re: CentOS 7 should be treated like RHEL 7 in dist/rhel.py

 

I believe this should be marked as fixed as the uses_systemd function
was updated previous:

https://github.com/cloud-init/cloud-
init/blob/master/cloudinit/distros/__init__.py#L100


** Changed in: cloud-init
       Status: New => Fix Released

-- 
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/1411829

Title:
  CentOS 7 should be treated like RHEL 7 in dist/rhel.py

Status in cloud-init:
  Fix Released

Bug description:
  cloudinit/dists/rhel.py contains the follow code to determine if
  systemd is in use:

      def uses_systemd(self):
          # Fedora 18 and RHEL 7 were the first adopters in their series
          (dist, vers) = util.system_info()['dist'][:2]
          major = (int)(vers.split('.')[0])
          return ((dist.startswith('Red Hat Enterprise Linux') and major >= 7)
                  or (dist.startswith('Fedora') and major >= 18))

  
  This will not produce the correct behavior on CentOS 7, Scientific LInux 7, or any other RHEL-based distribution.  Among other issues, this will prevent cloud-init from setting the system hostname correctly.  Because these distributions are treated like RHEL6 and earlier, cloud-init writes the persistent hostname into /etc/sysconfig/network, but the hostname is not read from this file when the system boots.

  I propose that we replace uses_systemd with the following:

      def uses_systemd(self):
          return os.path.isfile('/usr/bin/systemctl')

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


References