add new user without reboot of nodes

1,217 views
Skip to first unread message

Vince Forgetta

unread,
Aug 20, 2015, 2:39:11 PM8/20/15
to Warewulf
Hi all,

I have gotten Warewulf 3.6 setup on a cluster of 12 nodes running CentOS6. Big thanks to all those who have helped get to this point :)

I can add users as per instructions here:


However, if I understand this properly, to propagate this to nodes required a reboot.

Seeing that I may need to add new users intermittently, and tasks may be running on the cluster, I would like to avoid rebooting the cluster every time a new user is created.

Is there a way to do this from within Warewulf? Or do I need to copy the file to each node using something like pdsh?

Thanks,

Vince

Chu Ruilin

unread,
Aug 20, 2015, 2:45:30 PM8/20/15
to ware...@lbl.gov
Hi Vince

After you create the user on the head node, you can use wwsh to sync the account:

wwsh -y file import /etc/passwd
wwsh -y file import /etc/group
wwsh -y file import /etc/shadow
wwsh -y provision set --fileadd passwd,group,shadow
wwsh file sync

and wait a few minute before all the compute nodes sync the files.

Jimi Chu

--
You received this message because you are subscribed to the Google Groups "Warewulf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to warewulf+u...@lbl.gov.
To post to this group, send email to ware...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/warewulf/8bbe8f95-856f-42cb-b1c1-a78b34705043%40lbl.gov.
For more options, visit https://groups.google.com/a/lbl.gov/d/optout.

Jason Stover

unread,
Aug 20, 2015, 3:15:57 PM8/20/15
to ware...@lbl.gov
On Thu, Aug 20, 2015 at 1:45 PM, Chu Ruilin <ruil...@gmail.com> wrote:
wwsh -y provision set --fileadd passwd,group,shadow

As a note, on newer versions the above will not (or *should not*) work. Any commands that make a modification should require a node list. If you want the same behavior of affecting all nodes then you can run the command like:

    # wwsh -y provision set --fileadd passwd,group,shadow \*

The '*' is used in lookups as a wildcard, and needs to be escaped if running as a 'wwsh' command. I believe that 3.6 has the behavior of if nothing is specified, act on everything.

-J

Vince Forgetta

unread,
Aug 20, 2015, 3:39:37 PM8/20/15
to ware...@lbl.gov
This works. Thanks! 

Vince

--
You received this message because you are subscribed to the Google Groups "Warewulf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to warewulf+u...@lbl.gov.
To post to this group, send email to ware...@lbl.gov.

alpesh kothari

unread,
Oct 22, 2015, 11:37:38 AM10/22/15
to Warewulf
Hi everyone,

Mine is still not working. I tried all the above steps.

alpesh

Vince Forgetta

unread,
Oct 22, 2015, 11:42:37 AM10/22/15
to ware...@lbl.gov
Hi alpesh,

Can you please provide the exact commands you used.

Thanks,

V

alpesh kothari

unread,
Oct 22, 2015, 11:50:40 AM10/22/15
to Warewulf
wwsh -y file import /etc/passwd
wwsh -y file import /etc/passwd
   wwsh -y file import /etc/group
   wwsh -y file import /etc/shadow
   wwsh -y file import /root/.ssh/authorized_keys
   wwsh -y file import /etc/munge/munge.key
   wwsh -y file import /etc/slurm/slurm.conf
    wwsh -y provision set --fileadd passwd,group,shadow,slurm.conf,munge.key,dynamic_hosts,authorized_keys \*
   wwsh file sync

Jason Stover

unread,
Oct 22, 2015, 12:09:02 PM10/22/15
to ware...@lbl.gov
Hi alpesh,

  Can you give me the output of both:

    wwsh file print passwd
    wwsh object dump passwd

-J

alpesh kothari

unread,
Oct 22, 2015, 12:13:22 PM10/22/15
to Warewulf

#### passwd ###################################################################
passwd          : ID               = 16
passwd          : NAME             = passwd
passwd          : PATH             = /etc/passwd
passwd          : ORIGIN           = /etc/passwd
passwd          : FORMAT           = data
passwd          : CHECKSUM         = 6eda79c7386a294950a38dae2c50ca33
passwd          : INTERPRETER      = UNDEF
passwd          : SIZE             = 2078
passwd          : MODE             = 0644
passwd          : UID              = 0
passwd          : GID              = 0

     wwsh object dump passwd

Object #0:  OBJECT REF Warewulf::File=HASH(0x2152d68) {
    "CHECKSUM" (8) => "6eda79c7386a294950a38dae2c50ca33" (32)
    "FORMAT" (6) => "data" (4)
    "GID" (3) => 0
    "MODE" (4) => 420
    "NAME" (4) => "passwd" (6)
    "ORIGIN" (6) => "/etc/passwd" (11)
    "PATH" (4) => "/etc/passwd" (11)
    "SIZE" (4) => 2078
    "UID" (3) => 0
    "_ID" (3) => 16
    "_TIMESTAMP" (10) => 1445527343
    "_TYPE" (5) => "file" (4)

Vince Forgetta

unread,
Oct 22, 2015, 12:18:29 PM10/22/15
to ware...@lbl.gov
Please try:

wwsh file sync \*

Maybe the issue brought up by Jason for provision also applies to sync.

V


--
You received this message because you are subscribed to the Google Groups "Warewulf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to warewulf+u...@lbl.gov.
To post to this group, send email to ware...@lbl.gov.

Jason Stover

unread,
Oct 22, 2015, 12:21:25 PM10/22/15
to ware...@lbl.gov
Okay, what version of WW are you running? There was a nice? bug *looks around* that causes wwgetfiles to do nothing.

If you look on a node, is there a file named:  /tmp/.wwgetfile.lock ?  The current SVN has it fixed, but basically in the file /warewulf/transports/http/wwgetfiles (on a node) you'll need to move the removal of the lock at the end, to the 3-4 places where it exits in the loop above.

-J


--
You received this message because you are subscribed to the Google Groups "Warewulf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to warewulf+u...@lbl.gov.
To post to this group, send email to ware...@lbl.gov.

alpesh kothari

unread,
Oct 22, 2015, 12:28:38 PM10/22/15
to Warewulf
Current version 3.6, which was downloaded from yum repository.

alpesh kothari

unread,
Oct 22, 2015, 12:29:26 PM10/22/15
to Warewulf
Hey, file is still not updated.

alpesh kothari

unread,
Oct 22, 2015, 12:31:02 PM10/22/15
to Warewulf
And there no .lock present.


On Thursday, 22 October 2015 12:21:25 UTC-4, Jason Stover wrote:

Jason Stover

unread,
Oct 22, 2015, 12:34:22 PM10/22/15
to ware...@lbl.gov
Okay ... no lock, and files not updating....   Was cron installed in the VNFS you're using?

On a node try the following:

# cat /etc/cron.d/wwupdatefiles
# ls -l /etc/passwd
# SLEEPTIME=0 /warewulf/bin/wwgetfiles
# ls -l /etc/passwd

-J


alpesh kothari

unread,
Oct 22, 2015, 12:43:29 PM10/22/15
to Warewulf
When I ran the given commands, it got stuck in wwgetfiles and giving the following output on terminal as well as log file  " ..............  "
And its still running

alpesh kothari

unread,
Oct 22, 2015, 12:44:11 PM10/22/15
to Warewulf

cat /etc/cron.d/wwupdatefiles

0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /warewulf/bin/wwgetfiles >/var/log/wwgetfiles.log 2>&1



On Thursday, 22 October 2015 12:34:22 UTC-4, Jason Stover wrote:

Jason Stover

unread,
Oct 22, 2015, 12:51:58 PM10/22/15
to ware...@lbl.gov
Okay, that's it's loop wait timer when it can't talk to the Master (provisioner).   On your provisioner check /var/log/httpd/error_log for errors coming from requests to /WW/file 

Lets see if you can actually talk to it manually, so on a node do:

# source /warewulf/config
# ping ${WWMASTER}
# wget http://${WWMASTER}/WW/file?hwaddr=${WWINIT_HWADDR}&timestamp=0

If that works, you should get a list returned of the files associated with the node.

-J

alpesh kothari

unread,
Oct 22, 2015, 1:03:58 PM10/22/15
to Warewulf
commands until ping works fine. But, whenit comes to wget it says command not found. I think wget is not installed. Is it required to install wget?

Jason Stover

unread,
Oct 22, 2015, 1:11:03 PM10/22/15
to ware...@lbl.gov
Yeah, wget is needed for the transfer from the provisioner to a node. We might want to try curl as a fallback as well. I thought wget was a part of the standard templates though...

-J


--
You received this message because you are subscribed to the Google Groups "Warewulf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to warewulf+u...@lbl.gov.
To post to this group, send email to ware...@lbl.gov.

Chu Ruilin

unread,
Oct 22, 2015, 1:16:53 PM10/22/15
to ware...@lbl.gov
wget is indeed in the standard templates

alpesh kothari

unread,
Oct 22, 2015, 2:34:18 PM10/22/15
to Warewulf
Thank you so much Jason, Vince and Jimi. I was trying to fix this problem from 4 days. But, normally wget comes installed by default right? Finaly, fixed the issue.

Vince Forgetta

unread,
Oct 22, 2015, 2:53:38 PM10/22/15
to ware...@lbl.gov
Depends on the OS image you use.  I am using CentOS minimal, and by default wget is not installed.

Jason Stover

unread,
Oct 22, 2015, 3:06:11 PM10/22/15
to ware...@lbl.gov
Okay, was just curious. It appears all (most) of the default template files used with wwmkchroot include wget (rhel-generic, sl-6, etc...). Anything outside of that... Couldn't easily help ya on! :)

-J
Reply all
Reply to author
Forward
0 new messages