[Hyper-V][Azure]ifdown/ifup fail to run on FreeBSD

Bug #1697815 reported by Hongjiang Zhang on 2017-06-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Medium
Hongjiang Zhang

Bug Description

An error was found when cloud-init running on FreeBSD, even it does not impact the functionality. There is an error in /var/log/cloud-init.log complaining "ifdown" and "ifup" fail to run.

Related branches

Hongjiang Zhang (redriver) wrote :

The error log:

2017-06-15 15:16:23,852 - util.py[DEBUG]: Running command ['sh', '-xc', 'i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x'] with allowed return codes [0] (shel
l=False, capture=False)
2017-06-15 15:16:23,864 - util.py[DEBUG]: publishing hostname took 0.012 seconds (0.01)
2017-06-15 15:16:23,864 - DataSourceAzure.py[WARNING]: Failed publishing hostname: Unexpected error while running command.
Command: ['sh', '-xc', 'i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x']
Exit code: 127
Reason: -
Stdout: -
Stderr: -
2017-06-15 15:16:23,879 - util.py[WARNING]: handling set_hostname failed
2017-06-15 15:16:23,883 - util.py[DEBUG]: handling set_hostname failed
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/cloud_init-0.7.9-py2.7.egg/cloudinit/sources/DataSourceAzure.py", line 277, in bounce_network_with_azure_hostname
    prev_hostname=previous_hostname)
  File "/usr/local/lib/python2.7/site-packages/cloud_init-0.7.9-py2.7.egg/cloudinit/sources/DataSourceAzure.py", line 555, in perform_hostname_bounce
    'env': env})
  File "/usr/local/lib/python2.7/site-packages/cloud_init-0.7.9-py2.7.egg/cloudinit/util.py", line 2243, in log_time
    ret = func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/cloud_init-0.7.9-py2.7.egg/cloudinit/util.py", line 1852, in subp
    cmd=args)
ProcessExecutionError: Unexpected error while running command.
Command: ['sh', '-xc', 'i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x']
Exit code: 127
Reason: -
Stdout: -
Stderr: -
2017-06-15 15:16:23,932 - util.py[DEBUG]: Running command ['hostname', u'honzhanclvm'] with allowed return codes [0] (shell=False, capture=True)

Scott Moser (smoser) on 2017-06-15
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Hongjiang Zhang (redriver)

This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers