← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1698077] Re: variant value is "unknown" on FreeBSD when invoking util.system_info()

 

this seems to be fixed (although i cannot tell since when)

```
Python 3.7.9 (default, Oct  3 2020, 01:29:35) 
[Clang 8.0.1 (tags/RELEASE_801/final 366581)] on freebsd12
Type "help", "copyright", "credits" or "license" for more information.
>>> import cloudinit
>>> from cloudinit import util
>>> util.system_info()
{'platform': 'FreeBSD-12.2-RELEASE-amd64-64bit-ELF', 'system': 'FreeBSD', 'release': '12.2-RELEASE', 'python': '3.7.9', 'uname': ['FreeBSD', 'fbsd12-1', '12.2-RELEASE', 'FreeBSD 12.2-RELEASE r366954 GENERIC', 'amd64', 'amd64'], 'dist': ('freebsd', '12.2', ''), 'variant': 'freebsd'}
>>> util.system_info()['variant']
'freebsd'
>>> 
```

** Changed in: cloud-init
       Status: Confirmed => 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/1698077

Title:
  variant value is "unknown" on FreeBSD when invoking util.system_info()

Status in cloud-init:
  Fix Released

Bug description:
  When I run "python3 tools/render-cloudcfg config/cloud.cfg.tmpl
  config/cloud.cfg" on FreeBSD, the cloud.cfg was created for ubuntu
  instead of FreeBSD. After investigation, I found the root cause is
  util.system_info().

  platform.platform() gets "FreeBSD-11.0-RELEASE-p9-amd64-64bit-ELF" on
  FreeBSD 11.0. So, the following code does not work as expected.

      if plat.startswith('darwin'):
          info['variant'] = 'darwin'
      elif plat.endswith("bsd"):
          info['variant'] = 'bsd'

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


References