[Bug 1775086] Re: cloud-init fails to recognize scaleway

2018-06-05 Thread Louis Bouchard
Hello,

Indeed, scw-generate-network-config does create a circular dependancy
hence systemd ends up shooting the cloud-init unit which breaks the
cloud-init.process.

We are in the process of implementing cloud-init on our platform. Please
keep yourself up to date, there should be some announcement soon.

Kind regards,

...Louis

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1775086

Title:
  cloud-init fails to recognize scaleway

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1775086] Re: cloud-init fails to recognize scaleway

2018-06-05 Thread Vincent Ladeuil
Yeah, there is a significant overlap between scw-generate-network-config and 
cloud-init here. 
I think it makes sense to align both approaches ;-)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1775086

Title:
  cloud-init fails to recognize scaleway

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1775086] Re: cloud-init fails to recognize scaleway

2018-06-04 Thread Chad Smith
Marking as not a bug as it feels like the resolution really needs to be
on the Scaleway platform with this script. Please feel free to re-open
this bug if you disagree. I may have misunderstood the intent.

Also, if scw-generate-network-config is in use on artful, bionic or
cosmic, it'll need to be updated to use netwplan configuration unless
ifupdown is installed in your cloud images because netplan.io is the new
default in ubuntu cloud images.

** Changed in: cloud-init (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1775086

Title:
  cloud-init fails to recognize scaleway

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1775086] Re: cloud-init fails to recognize scaleway

2018-06-04 Thread Chad Smith
This unit is generating network config which I thought would be owned
solely by cloud-init. Cloudinit should be generating a fallback network
configuration, which sets up dhcp on the primary nic (eth0/enp0s2 etc).
First you'll need to resolve the ordering cycle conflict with cloud-
init.service and the scw-generate-net-config unit.  Then, there is a bit
of tension between cloud-init managing network config and scw-generate-
net-config as that script blows away the cloud-init fallback network
configuration. One alternative for cloud-init enabled images would be to
only allow scw-generate-net-config to generate dhcp configs for devices
!= . The other could be to disable cloud-init's network
configuration altogether via
http://cloudinit.readthedocs.io/en/latest/topics/network-config.html
#disabling-network-configuration.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1775086

Title:
  cloud-init fails to recognize scaleway

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1775086] Re: cloud-init fails to recognize scaleway

2018-06-04 Thread Vincent Ladeuil
I created another instance and did 'systemctl --no-pager disable scw-
generate-net-config' before installing cloud-init.

2 reboots later and things are still fine.

I think that counts as a workaround but I don't know systemd enough to
decide if someone is wrong here :-/


root@image-builder-scw-amd64:/lib/systemd/system# cat 
/etc/systemd/system/scw-generate-net-config.service
[Unit]
Description=Generate network configuration
Before=networking.service

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/scw-generate-net-config

[Install]
WantedBy=networking.service

root@image-builder-scw-amd64:/lib/systemd/system# cat 
/usr/local/sbin/scw-generate-net-config
#! /bin/bash

find /etc/network/interfaces.d/ -not -name "*.user.cfg" -type f -delete
for iface in $(ls /sys/class/net); do
# Only configure physical interfaces
if readlink /sys/class/net/$iface | grep --invert-match --silent 'virtual'; 
then
echo """# Generated by $(basename $0)
auto $iface
iface $iface inet dhcp
""" > /etc/network/interfaces.d/$iface.cfg
fi
done

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1775086

Title:
  cloud-init fails to recognize scaleway

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1775086] Re: cloud-init fails to recognize scaleway

2018-06-04 Thread Vincent Ladeuil
** Attachment added: "list-dependencies.txt"
   
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1775086/+attachment/5148786/+files/list-dependencies.txt

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1775086

Title:
  cloud-init fails to recognize scaleway

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1775086] Re: cloud-init fails to recognize scaleway

2018-06-04 Thread Vincent Ladeuil
systemctl status cloud-init.service

● cloud-init.service - Initial cloud-init job (metadata service crawler)
   Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor 
prese   Active: inactive (dead)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1775086

Title:
  cloud-init fails to recognize scaleway

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1775086] Re: cloud-init fails to recognize scaleway

2018-06-04 Thread Vincent Ladeuil
root@image-builder-scw-amd64:~# systemctl --no-pager status cloud-init.service
● cloud-init.service - Initial cloud-init job (metadata service crawler)
   Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor 
preset: enabled)
   Active: inactive (dead)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1775086

Title:
  cloud-init fails to recognize scaleway

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1775086] Re: cloud-init fails to recognize scaleway

2018-06-04 Thread Chad Smith
Thanks vincent for making cloud-init better please also attach the
output of the following:

systemctl list-dependencies output 
and systemctl status cloud-init.service 


from journal.txt I see 
Jun 04 21:31:30.292811 image-builder-scw-amd64 systemd[1]: sysinit.target: 
Breaking ordering cycle by deleting job cloud-init.service/start
Jun 04 21:31:30.292827 image-builder-scw-amd64 systemd[1]: cloud-init.service: 
Job cloud-init.service/start deleted to break ordering cycle starting with 
sysinit.target/start
Jun 04 21:31:30.292845 image-builder-scw-amd64 systemd[1]: Created slice System 
Slice.


this cycle break I think is what's causing cloud-init to avoid running the 
init-network stage (which discovers Scaleway) via a call to 'cloud-init init'

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1775086

Title:
  cloud-init fails to recognize scaleway

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1775086] Re: cloud-init fails to recognize scaleway

2018-06-04 Thread Vincent Ladeuil
> user_data.txt: Error: [Errno 2] No such file or directory:
'/var/lib/cloud/instance/user-data.txt'

Fallout from /var/lib/cloud/instance being a dir rather than a symlink.

I empirically understood that this is caused by
cloudinit.util.write_file calling ensure_dir()

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1775086

Title:
  cloud-init fails to recognize scaleway

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs