2

From Spacewalk server ( from UI), I could install packages on client only after executing "rhn_check" command on client; until then, it simply shows the action as pending. Date and time are synchronized. Keys are working fine. I didn't schedule it to later time. I selected "Schedule action as soon as possible".

Of course we can write a script or something, but obviously something is wrong. I don't want to wait for 4hrs either.

rajadhiraja
  • 58
  • 1
  • 1
  • 7

3 Answers3

3

So rhn_check(1) is the program that queries the Spacewalk server, picking up pending actions, but rhnsd(8) is the service that runs rhn_check. I realize now that the "4 hrs" that you mention is the "240 minutes" mentioned in the man page:

    $ man rhnsd
    RHNSD(8)                         Red Hat, Inc.                        RHNSD(8)

    NAME
           rhnsd  -  A  program  for  querying the Red Hat Network for updates and
           information.
    ...
    DESCRIPTION
    ...
           The rhnsd daemon does not listen on any network ports, nor does it ever
           talk to the network directly. Any network  activity  is  done  via  the
           rhn_check utility.
    ...
    OPTIONS
           -i, --interval
                  Specify the interval that rhnsd should wait between checking the
                  Red Hat Network. Default is 240 minutes, the minimum is 60  min-
                  utes. This can also be specified in /etc/sysconfig/rhn/rhnsd
    ...

On my box:

    $ cat /etc/redhat-release
    CentOS release 5.5 (Final)
    $ cat /etc/sysconfig/rhn/rhnsd
    INTERVAL=240

As the man page mentions, the minimum is 60 minutes, which seems a tad unreasonable. I guess the best solution is to update /etc/sysconfig/rhn/rhnsd, setting INTERVAL to 60.

  • Thanks for your reply. Any reason why we can't go less than 60 minutes? I prefer immediate action to be taken, say less than a minute. If at all I have to schedule it for after 60 minutes, I'd rather use Schedule feature. What's that delay of 60 minutes for? – rajadhiraja Aug 14 '13 at 15:40
2

As kernelpanic says osad takes care of this.

make sure osad is installed and runnig. It requires TCP 5222 to the spacewalk from client system, and you can check witn rhn-actions-control --report weather the satellite is permitted to run run programs on the client.

If you use osad in stead of rhn_check, then you can schedule activities from the spacewalk, and the connected nodes should pick up instantaniously. That's why I'd recommend enabling osad as well.

Petter H
  • 3,383
  • 1
  • 14
  • 18
1

The osad service enables instant push to Spacewalk clients.

On client system:

yum install osad
service osad start
kernelpanic
  • 1,246
  • 1
  • 10
  • 30
  • 1
    How is osad better than a cronjob of rhn_check customized to our needs. (Say run rhn_check only after production hours, etc.) – rajadhiraja Aug 14 '13 at 20:04