Azure: bouncing of network device/publishing of hostname fails on artful
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Unassigned | ||
cloud-init (Ubuntu) |
Fix Released
|
Critical
|
Unassigned |
Bug Description
Launch an instance on Azure (20171005.1) and I find in /var/log/
the following:
2017-10-10 21:16:25,598 - DataSourceAzure
Command: ['sh', '-xc', 'i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x']
Exit code: 127
Reason: -
Stdout: -
Stderr: -
2017-10-10 21:16:25,598 - util.py[WARNING]: handling set_hostname failed
2017-10-10 21:16:25,598 - util.py[DEBUG]: handling set_hostname failed
Traceback (most recent call last):
File "/usr/lib/
prev_
File "/usr/lib/
'env': env})
File "/usr/lib/
ret = func(*args, **kwargs)
File "/usr/lib/
cmd=args)
cloudinit.
Command: ['sh', '-xc', 'i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x']
Exit code: 127
Reason: -
Stdout: -
Stderr: -
The command output is not captured, so we see in /var/log/
+ i=eth0
+ x=0
+ ifdown eth0
sh: 1: ifdown: not found
+ x=127
+ ifup eth0
sh: 1: ifup: not found
+ x=127
+ exit 127
This is not surprising, there is no 'ifup' or 'ifdown', so the attempt to
"bounce" the network device in order to re-publish the hostname that
has been set will fail.
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: cloud-init 17.1-17-
ProcVersionSign
Uname: Linux 4.13.0-12-generic x86_64
ApportVersion: 2.20.7-0ubuntu2
Architecture: amd64
CloudName: Azure
Date: Tue Oct 10 21:45:09 2017
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
user_data.txt:
Related bugs:
* bug 1674685: hostname ddns update is not done on azure with built-in agent path.
* bug 1574963: juju2 lxd launch hostname reverse lookup inconsistent
Related branches
- Scott Moser: Needs Fixing
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 134 lines (+40/-13)2 files modifiedcloudinit/sources/DataSourceAzure.py (+16/-9)
tests/unittests/test_datasource/test_azure.py (+24/-4)
description: | updated |
Changed in cloud-init: | |
status: | Confirmed → Fix Committed |
Note that bug 1722668 in cloud-init means there is still work to do
after this bug is fixed. hostnames wont be "published" correctly, but
this bug is more severe. We'll work the other in parallel.