cloud-init fails when deploying CentOS with Juju.

Bug #1492066 reported by Matt Bruzek
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Dimiter Naydenov
1.24
Won't Fix
Low
Unassigned
1.25
Fix Released
Critical
Dimiter Naydenov

Bug Description

I was working with deploying a CentOS image on canonistack and I noticed that cloud-init failed and the juju agent was not installed.

Looking at the cloud-init.log file it appears a systemctl command in runcmd failed:

+ su ubuntu -c 'printf "%s\n" "$authorized_keys" >> ~/.ssh/authorized_keys'
+ systemctl stop firewalld
Failed to issue method call: Unit firewalld.service not loaded.
2015-09-03 22:21:48,911 - util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/runcmd [5]
2015-09-03 22:21:48,931 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2015-09-03 22:21:48,931 - util.py[WARNING]: Running scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_scripts_user.pyc'>) failed

It does not appear the firewalld service is loaded on this image

# systemctl status firewalld
firewalld.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

The image I was using is: CentOS-7-x86_64-GenericCloud-1503

Is it possible to check for this service before trying to stop it?

Revision history for this message
Matt Bruzek (mbruzek) wrote :
Ian Booth (wallyworld)
Changed in juju-core:
milestone: none → 1.26-alpha1
importance: Undecided → Critical
status: New → Triaged
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Fix for 1.25 proposed: http://reviews.vapour.ws/r/2637/

Changed in juju-core:
assignee: nobody → Dimiter Naydenov (dimitern)
Changed in juju-core:
status: Triaged → In Progress
Revision history for this message
Matt Bruzek (mbruzek) wrote : Re: [Bug 1492066] Re: cloud-init fails when deploying CentOS with Juju.

Hello Dimiter,

Thanks for working on this!

   - Matt Bruzek <email address hidden>

On Tue, Sep 15, 2015 at 3:53 AM, Dimiter Naydenov <
<email address hidden>> wrote:

> ** Changed in: juju-core
> Status: Triaged => In Progress
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1492066
>
> Title:
> cloud-init fails when deploying CentOS with Juju.
>
> Status in juju-core:
> In Progress
> Status in juju-core 1.25 series:
> In Progress
>
> Bug description:
> I was working with deploying a CentOS image on canonistack and I
> noticed that cloud-init failed and the juju agent was not installed.
>
> Looking at the cloud-init.log file it appears a systemctl command in
> runcmd failed:
>
> + su ubuntu -c 'printf "%s\n" "$authorized_keys" >>
> ~/.ssh/authorized_keys'
> + systemctl stop firewalld
> Failed to issue method call: Unit firewalld.service not loaded.
> 2015-09-03 22:21:48,911 - util.py[WARNING]: Failed running
> /var/lib/cloud/instance/scripts/runcmd [5]
> 2015-09-03 22:21:48,931 - cc_scripts_user.py[WARNING]: Failed to run
> module scripts-user (scripts in /var/lib/cloud/instance/scripts)
> 2015-09-03 22:21:48,931 - util.py[WARNING]: Running scripts-user
> (<module 'cloudinit.config.cc_scripts_user' from
> '/usr/lib/python2.7/site-packages/cloudinit/config/cc_scripts_user.pyc'>)
> failed
>
> It does not appear the firewalld service is loaded on this image
>
> # systemctl status firewalld
> firewalld.service
> Loaded: not-found (Reason: No such file or directory)
> Active: inactive (dead)
>
> The image I was using is: CentOS-7-x86_64-GenericCloud-1503
>
> Is it possible to check for this service before trying to stop it?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1492066/+subscriptions
>

Curtis Hovey (sinzui)
Changed in juju-core:
importance: Critical → High
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Cheers Matt, please let me know if it works fine now on CentOS :)

Fix for master proposed with: http://reviews.vapour.ws/r/2673/

Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
Revision history for this message
Anastasia (anastasia-macmood) wrote :

targeted against old milestone

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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