Dependency woe #27

Closed
doismellburning opened this Issue Dec 26, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@doismellburning

I believe there's an issue with the dependency ordering such that it's possible to get supervisord into a state where it can't be repaired without manual intervention.

I had a manifest with environment=>FOO=BAR BAZ causing supervisord config to be generated with environment=FOO=BAR BAZ, which triggered a quoting bug in the version of supervisord - https://lists.supervisord.org/pipermail/supervisor-users/2010-March/000539.html so supervisord failed to start with Starting supervisor: Error: Unexpected end of key/value pairs

Updating my manifest to fix this, and reloading vagrant to reapply puppet:

notice: /Stage[main]/Supervisor/File[/var/run/supervisor]/ensure: created

err: /Stage[main]/Supervisor/Service[supervisor]/ensure: change from stopped to running failed: Could not start Service[supervisor]: Execution of '/etc/init.d/supervisor start' returned 2:  at /tmp/vagrant-puppet/modules-0/supervisor/manifests/init.pp:198

notice: /Stage[main]//Supervisor::Service[flamelinks]/File[/var/log/supervisor/flamelinks]: Dependency Service[supervisor] has failures: true

warning: /Stage[main]//Supervisor::Service[flamelinks]/File[/var/log/supervisor/flamelinks]: Skipping because of failed dependencies

notice: /Stage[main]//Supervisor::Service[flamelinks]/File[/etc/supervisor/flamelinks.ini]: Dependency Service[supervisor] has failures: true

warning: /Stage[main]//Supervisor::Service[flamelinks]/File[/etc/supervisor/flamelinks.ini]: Skipping because of failed dependencies

notice: /Stage[main]//Supervisor::Service[flamelinks]/Service[supervisor::flamelinks]: Dependency Service[supervisor] has failures: true

warning: /Stage[main]//Supervisor::Service[flamelinks]/Service[supervisor::flamelinks]: Skipping because of failed dependencies

notice: /Stage[main]/Supervisor::Update/Exec[supervisor::update]: Dependency Service[supervisor] has failures: true

warning: /Stage[main]/Supervisor::Update/Exec[supervisor::update]: Skipping because of failed dependencies

I believe this is because, looking at manifests/service.pp, the .ini resource requires the log file:

  file { "${supervisor::params::conf_dir}/${name}.ini":
    ensure  => $config_ensure,
    content => template('supervisor/service.ini.erb'),
    require => File["/var/log/supervisor/${name}"],
    notify  => Class['supervisor::update'],
  }

and the log file requires the class:

  file { "/var/log/supervisor/${name}":
    ensure  => $dir_ensure,
    owner   => $user,
    group   => $group,
    mode    => '0750',
    recurse => $dir_recurse,
    force   => $dir_force,
    require => Class['supervisor'],
  }

and I believe the class requires the base supervisord instance to be running, which of course it now won't do due to a broken .ini file.

I can trivially fix this by manually rming the broken .ini file, but this doesn't seem ideal - not sure of the best solution though.

@ghost ghost assigned saz Dec 28, 2012

@saz

This comment has been minimized.

Show comment Hide comment
@saz

saz Dec 28, 2012

Contributor

I think the only way to fix this, is a change of the require parameter on the file resource /var/log/supervisor/${name} from Class['supervisor'] to File['/var/log/supervisor'].

I'll fix this asap.

Contributor

saz commented Dec 28, 2012

I think the only way to fix this, is a change of the require parameter on the file resource /var/log/supervisor/${name} from Class['supervisor'] to File['/var/log/supervisor'].

I'll fix this asap.

@plathrop

This comment has been minimized.

Show comment Hide comment
@plathrop

plathrop Aug 6, 2015

Owner

Closing due to lack of activity.

Owner

plathrop commented Aug 6, 2015

Closing due to lack of activity.

@plathrop plathrop closed this Aug 6, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment