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

Bug #1697815 reported by Hongjiang Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
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

Revision history for this message
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)
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Hongjiang Zhang (redriver)
Revision history for this message
Scott Moser (smoser) wrote : Fixed in Cloud-init 17.1

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
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.