Skip to content

(PUP-5257) Update client init script for EL4#4252

Merged
joshcooper merged 1 commit intopuppetlabs:stablefrom
geoffnichols:PE-12034/stable/update_redhat_client_init
Sep 21, 2015
Merged

(PUP-5257) Update client init script for EL4#4252
joshcooper merged 1 commit intopuppetlabs:stablefrom
geoffnichols:PE-12034/stable/update_redhat_client_init

Conversation

@geoffnichols
Copy link
Contributor

Prior to this commit, managing the AIO
puppet-agent's puppet service using
puppet resource fails on EL4.

Because EL4's /etc/init.d/functions do not
take pid as an argument, we're not able to
use the built-in 'status' or 'killproc'
functions, as these will check the status of
and/or kill the puppet resource process
itself.

This commit updates the EL init script to
allow use of puppet resource to manage the
puppet service on EL4, while continuing to
use the built-in 'status' and 'killproc'
functions on EL5 and EL6.

@geoffnichols geoffnichols force-pushed the PE-12034/stable/update_redhat_client_init branch 2 times, most recently from 6fe16f7 to 45d83fb Compare September 16, 2015 14:11
@joshcooper
Copy link
Contributor

Ouch, this is the third puppet/mco service related issue. We'll be fixing https://tickets.puppetlabs.com/browse/PUP-5057 in the sprint starting today.

@joshcooper
Copy link
Contributor

@geoffnichols Can we get a PUP ticket?

@geoffnichols geoffnichols changed the title (maint) Update client init script for EL4 (PUP-5257) Update client init script for EL4 Sep 16, 2015
@geoffnichols geoffnichols force-pushed the PE-12034/stable/update_redhat_client_init branch from 45d83fb to a502b9a Compare September 16, 2015 17:34
@geoffnichols
Copy link
Contributor Author

@joshcooper Updated to add a PUP ticket.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we even bother calling status if we're just going to set RETVAL to 3?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I was confused here. Update in progress...

@geoffnichols geoffnichols force-pushed the PE-12034/stable/update_redhat_client_init branch 2 times, most recently from 719baf2 to 4c7e29e Compare September 17, 2015 00:48
@geoffnichols
Copy link
Contributor Author

@haus @shrug Thanks, updated!

@geoffnichols geoffnichols force-pushed the PE-12034/stable/update_redhat_client_init branch from 4c7e29e to c5c2e65 Compare September 17, 2015 02:16
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this doesn't account for the "service dead but pid file exists" case.

@geoffnichols geoffnichols force-pushed the PE-12034/stable/update_redhat_client_init branch 3 times, most recently from 60670bf to 55da2ff Compare September 17, 2015 15:15
@shrug
Copy link
Contributor

shrug commented Sep 18, 2015

We probably need to ensure that the pidfile is created as well in the EL-4 case

@geoffnichols geoffnichols force-pushed the PE-12034/stable/update_redhat_client_init branch from 55da2ff to 417d667 Compare September 18, 2015 00:30
Prior to this commit, managing the AIO
puppet-agent's puppet service using
`puppet resource` fails on EL4.

Because EL4's /etc/init.d/functions do not
take pid as an argument, we're not able to
use the built-in 'status' or 'killproc'
functions, as these will check the status of
and/or kill the `puppet resource` process
itself.

This commit updates the EL init script to
allow use of `puppet resource` to manage the
puppet service on EL4, while continuing to
use the built-in 'status' and 'killproc'
functions on EL5 and EL6.
@geoffnichols geoffnichols force-pushed the PE-12034/stable/update_redhat_client_init branch from 417d667 to 5b9835f Compare September 18, 2015 00:35
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shrug Updated to ensure we're creating $piddir when starting the service.

@shrug
Copy link
Contributor

shrug commented Sep 18, 2015

👍

@joshcooper
Copy link
Contributor

Is an mco fix needed as well? Once puppet and mco services can be managed on el/centos-4, we can revert e23bb92.

@geoffnichols
Copy link
Contributor Author

@joshcooper It doesn't appear that an mco fix is needed.

@ScottGarman
Copy link
Contributor

👍

@geoffnichols
Copy link
Contributor Author

@joshcooper This has a couple of thumbs up from RE, but we'd like someone from Client to merge if this looks ok.

@joshcooper
Copy link
Contributor

👍

[root@ctfpnqewvnhvebw init.d]# puppet resource service puppet ensure=running
Notice: /Service[puppet]/ensure: ensure changed 'stopped' to 'running'
service { 'puppet':
  ensure => 'running',
}
[root@ctfpnqewvnhvebw init.d]# puppet resource service puppet ensure=running
service { 'puppet':
  ensure => 'running',
}
[root@ctfpnqewvnhvebw init.d]# puppet resource service puppet
service { 'puppet':
  ensure => 'running',
  enable => 'false',
}
[root@ctfpnqewvnhvebw init.d]# service puppet status
puppet (pid 7012) is running...
[root@ctfpnqewvnhvebw init.d]# puppet resource service puppet ensure=stopped
Notice: /Service[puppet]/ensure: ensure changed 'running' to 'stopped'
service { 'puppet':
  ensure => 'stopped',
}
[root@ctfpnqewvnhvebw init.d]# puppet resource service puppet ensure=stopped
service { 'puppet':
  ensure => 'stopped',
}
[root@ctfpnqewvnhvebw init.d]# puppet resource service puppet
service { 'puppet':
  ensure => 'stopped',
  enable => 'false',
}
[root@ctfpnqewvnhvebw init.d]# service puppet status
puppet is stopped

joshcooper added a commit that referenced this pull request Sep 21, 2015
…hat_client_init

(PUP-5257) Update client init script for EL4
@joshcooper joshcooper merged commit 3e21f90 into puppetlabs:stable Sep 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants