Issue #7201 has been updated by joy huang.

Thanks for your reply .

On puppet client side with different booting method to run puppet service,it 
happey very interesting following issue.

 when run this command :  puppet kick -p 10 --host client.joy.com --debug 
--trace 



(1)on the puppet client side run command: puppet agent --server master.joy.com  
to boot service 

then run puppet kick,it works  well.The puppet client can get right result.

[root@master manifests]# puppet kick -p 10 --host client.joy.com --debug --trace

Triggering client.joy.com

Getting status

status is success

client.joy.com finished with exit code 0

Finished



(2) on the puppet client side use puppet manage script:   /etc/init.d/puppet ( 
copy from puppet-2.6.7/conf/redhat/client.init)  to boot service

[root@master manifests]# puppet kick -p 10 --host client.joy.com --debug --trace

Triggering client.joy.com

Getting status

status is running

Host client.joy.com is already running

client.joy.com finished with exit code 3

Failed: client.joy.com



I see the puppetd daemon running on the puppet client side. but I wait 
for a long time(longer than runinterval = 120)  ,client can not get any 
right result.

It seem to  puppet client that it does not talk with puppetmaster. I do not 
know why?



3. /etc/init.d/puppet manage script is:

[root@client puppet]# cat /etc/init.d/puppet

#!/bin/bash

# puppet        Init script for running the puppet client daemon

#

# Author:       Duane Griffin <[email protected]>

#               David Lutterkort <[email protected]>

#

# chkconfig: - 98 02

#

# description: Enables periodic system configuration checks through puppet.

# processname: puppet

# config: /etc/sysconfig/puppet



PATH=/usr/bin:/sbin:/bin:/usr/sbin

export PATH



[ -f /etc/sysconfig/puppet ] && . /etc/sysconfig/puppet

lockfile=${LOCKFILE-/var/lib/puppet/state/puppetdlock}

pidfile=${PIDFILE-/var/lib/puppet/run/agent.pid}

puppetd=${PUPPETD-/usr/sbin/puppetd}

RETVAL=0



# Source function library.

. /etc/rc.d/init.d/functions



PUPPET_OPTS=""

[ -n "${PUPPET_SERVER}" ] && PUPPET_OPTS="--server=${PUPPET_SERVER}"

[ -n "$PUPPET_LOG" ] && PUPPET_OPTS="${PUPPET_OPTS} --logdest=${PUPPET_LOG}"

[ -n "$PUPPET_PORT" ] && PUPPET_OPTS="${PUPPET_OPTS} 
--masterport=${PUPPET_PORT}"



# Determine if we can use the -p option to daemon, killproc, and status.

# RHEL < 5 can't.

if status | grep -q -- '-p' 2>/dev/null; then

    daemonopts="--pidfile $pidfile"

    pidopts="-p $pidfile"

fi



# Figure out if the system just booted. Let's assume

# boot doesn't take longer than 5 minutes

## Not used for now

##[ -n "$INIT_VERSION" ] && PUPPET_OPTS="${PUPPET_OPTS} --fullrun"



start() {

    echo -n $"Starting puppet: "

    daemon $daemonopts $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS}

    RETVAL=$?

    echo

        [ $RETVAL = 0 ] && touch ${lockfile}

        return $RETVAL

}



stop() {

    echo -n $"Stopping puppet: "

    killproc $pidopts $puppetd

    RETVAL=$?

    echo

    [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}

}



reload() {

    echo -n $"Restarting puppet: "

    killproc $pidopts $puppetd -HUP

    RETVAL=$?

    echo

    return $RETVAL

}



restart() {

    stop

    start

}



rh_status() {

    status $pidopts $puppetd

    RETVAL=$?

    return $RETVAL

}



rh_status_q() {

    rh_status >/dev/null 2>&1

}



genconfig() {

    echo -n $"Generate configuration puppet: "

    $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} --genconfig

}



case "$1" in

    start)

        start

    ;;

    stop)

        stop

    ;;

    restart)

        restart

    ;;

    reload|force-reload)

        reload

    ;;

    condrestart|try-restart)

        rh_status_q || exit 0

        restart

    ;;

    status)

        rh_status

    ;;

    once)

        shift

        $puppetd -o ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} $@

        ;;

    genconfig)

        genconfig

    ;;

    *)

        echo $"Usage: $0 
{start|stop|status|restart|reload|force-reload|condrestart|once|genconfig}"

        exit 1

esac



exit $RETVAL



best regards

joy



Date: Thu, 21 Apr 2011 05:23:30 +0000
From: [email protected]
To:
 [email protected]; [email protected]; [email protected]; 
[email protected]; [email protected]; [email protected]; 
[email protected]; [email protected]
Subject: [Puppet - Bug #7201] [puppet2.7]puppet kick exit code 3










Issue #7201 has been updated by James Turnbull.



Can you also run it with:

puppet kick -p 10 --host client.joy.com --debug --trace


Thanks


Bug #7201: [puppet2.7]puppet kick exit code 3

Author: joy huangStatus: Needs More InformationPriority: HighAssignee: 
Category: serverTarget version: Affected Puppet version: Keywords: Branch: 

1.when i run the following “ puppet kick"command on puppet master,it return 
failed message:

    [root@master puppet]# puppet kick -p 10 --host client.joy.com
    Triggering client.joy.com
    Getting status
    status is running
    Host client.joy.com is already running
    client.joy.com finished with exit code 3
    Failed: client.joy.com



2.puppet agent relative setting is:

    [root@client puppet]cat /etc/puppet/auth.conf
    path ~ ^/catalog/([^/]+)$
    method find
    allow $1
    path /certificate_revocation_list/ca
    method find
    allow *
    # allow all nodes to store their reports
    path /report
    method save
    allow *
    # inconditionnally allow access to all files services
    # which means in practice that fileserver.conf will
    # still be used
    path /file
    allow *
    ### Unauthenticated ACL, for clients for which the current master doesn't
    ### have a valid certificate
    # allow access to the master CA
    path /certificate/ca
    auth no
    method find
    allow *
    path /certificate/
    auth no
    method find
    allow *
    path /certificate_request
    auth no
    method find, save
    allow *
    path /run
    method save
    allow *
    # this one is not stricly necessary, but it has the merit
    # to show the default policy which is deny everything else
    path /
    auth any
    [root@client puppet]# cat namespaceauth.conf
    [fileserver]
    allow *
    [puppetmaster]
    allow *
    [puppetrunner]
    allow *
    [puppetbucket]
    allow *
    [puppetreports]
    allow *
    [resource]
    allow *
    [root@client puppet]# cat puppet.conf
    [main]
    confdir = /etc/puppet
    vardir=/var/lib/puppet
    logdir = $vardir/log
    # Where Puppet PID files are kept.
    # The default value is $vardir/run.
    rundir = $vardir/run
    # The default value is $confdir/ssl.
    ssldir = $confdir/ssl
    [agent]
    pidfile = /var/lib/puppet/run/agent.pid
    classfile = $vardir/state/classes.txt
    localconfig = $vardir/localconfig
    server = master.joy.com
    #report = true
    listen = true



3.[root@client puppet]# netstat -lntp

    Proto Recv-Q Send-Q Local Address               Foreign Address             
State       PID/Program name
    tcp        0      0 0.0.0.0:8139                0.0.0.0:*                   
LISTEN      2515/ruby
    


The “puppetrun problem” is bothering me for a long time ,from puppet2.6.XX to 
puppet 2.7 release.

I need your help!

any suggestion is welcome

Thanks
joy





You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account
----------------------------------------
Bug #7201: [puppet2.7]puppet kick exit code 3
https://projects.puppetlabs.com/issues/7201

Author: joy huang
Status: Needs More Information
Priority: High
Assignee: 
Category: server
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


1.when i run the following " puppet kick"command on puppet master,it return 
failed message:

<pre>
    [root@master puppet]# puppet kick -p 10 --host client.joy.com
    Triggering client.joy.com
    Getting status
    status is running
    Host client.joy.com is already running
    client.joy.com finished with exit code 3
    Failed: client.joy.com
</pre>

2.puppet agent relative setting is:
<pre>
    [root@client puppet]cat /etc/puppet/auth.conf
    path ~ ^/catalog/([^/]+)$
    method find
    allow $1
    path /certificate_revocation_list/ca
    method find
    allow *
    # allow all nodes to store their reports
    path /report
    method save
    allow *
    # inconditionnally allow access to all files services
    # which means in practice that fileserver.conf will
    # still be used
    path /file
    allow *
    ### Unauthenticated ACL, for clients for which the current master doesn't
    ### have a valid certificate
    # allow access to the master CA
    path /certificate/ca
    auth no
    method find
    allow *
    path /certificate/
    auth no
    method find
    allow *
    path /certificate_request
    auth no
    method find, save
    allow *
    path /run
    method save
    allow *
    # this one is not stricly necessary, but it has the merit
    # to show the default policy which is deny everything else
    path /
    auth any
    [root@client puppet]# cat namespaceauth.conf
    [fileserver]
    allow *
    [puppetmaster]
    allow *
    [puppetrunner]
    allow *
    [puppetbucket]
    allow *
    [puppetreports]
    allow *
    [resource]
    allow *
    [root@client puppet]# cat puppet.conf
    [main]
    confdir = /etc/puppet
    vardir=/var/lib/puppet
    logdir = $vardir/log
    # Where Puppet PID files are kept.
    # The default value is $vardir/run.
    rundir = $vardir/run
    # The default value is $confdir/ssl.
    ssldir = $confdir/ssl
    [agent]
    pidfile = /var/lib/puppet/run/agent.pid
    classfile = $vardir/state/classes.txt
    localconfig = $vardir/localconfig
    server = master.joy.com
    #report = true
    listen = true
</pre>

3.[root@client puppet]# netstat -lntp
<pre>
    Proto Recv-Q Send-Q Local Address               Foreign Address             
State       PID/Program name
    tcp        0      0 0.0.0.0:8139                0.0.0.0:*                   
LISTEN      2515/ruby
</pre>    

The "puppetrun problem" is bothering me for a long time ,from puppet2.6.XX to 
puppet 2.7 release.

I need your help!
 
any suggestion is welcome
    Thanks
    joy



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to