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

Bug #1698077 reported by Hongjiang Zhang on 2017-06-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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'

do3meli (d-info-e) on 2018-03-17
tags: added: freebsd
Scott Moser (smoser) on 2018-03-19
Changed in cloud-init:
importance: Undecided → Medium
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers