Discussion:
func-inventory Patch
Hany Fahim
2011-03-11 17:49:20 UTC
Permalink
Hey Folks,

I've been a happy user of func for over a year now and loving it. I've been
running func-inventory on a set of machines for a while and I've noticed
that whenever one (or more) server is down, func-inventory stops in it's
tracks complaining about 'connection refused' and never completes the run on
the rest of the machines. I've attached a patch for inventory.py which
essentially allows the script to continue with the rest of the servers in
the list (changed a 'break' to 'continue'). This is my first patch being
submitted to the list, so please let me know if I'm not following standard
procedure.

Thanks for all your efforts!

hany
seth vidal
2011-03-15 19:51:44 UTC
Permalink
Post by Hany Fahim
Hey Folks,
I've been a happy user of func for over a year now and loving it. I've
been running func-inventory on a set of machines for a while and I've
noticed that whenever one (or more) server is down, func-inventory
stops in it's tracks complaining about 'connection refused' and never
completes the run on the rest of the machines. I've attached a patch
for inventory.py which essentially allows the script to continue with
the rest of the servers in the list (changed a 'break' to
'continue'). This is my first patch being submitted to the list, so
please let me know if I'm not following standard procedure.
What ver of func is this? I can't seem to replicate this behavior on my
test systems.

When 2 of the 3 minions are down the func-inventory call completes for
the one that is up.

when I bring up either of the other 2 it still completes.

It doesn't appear to be outputting about the other downed hosts -which
is still an issue -but not quite the same.

thoughts?
-sv
seth vidal
2011-03-15 19:55:01 UTC
Permalink
Post by seth vidal
Post by Hany Fahim
Hey Folks,
I've been a happy user of func for over a year now and loving it. I've
been running func-inventory on a set of machines for a while and I've
noticed that whenever one (or more) server is down, func-inventory
stops in it's tracks complaining about 'connection refused' and never
completes the run on the rest of the machines. I've attached a patch
for inventory.py which essentially allows the script to continue with
the rest of the servers in the list (changed a 'break' to
'continue'). This is my first patch being submitted to the list, so
please let me know if I'm not following standard procedure.
What ver of func is this? I can't seem to replicate this behavior on my
test systems.
When 2 of the 3 minions are down the func-inventory call completes for
the one that is up.
when I bring up either of the other 2 it still completes.
It doesn't appear to be outputting about the other downed hosts -which
is still an issue -but not quite the same.
thoughts?
okay -verified -your patch fixes the reporting of which hosts are down.

-sv
Hany Fahim
2011-03-16 13:43:17 UTC
Permalink
Hey Seth,

Just FYI, I'm using 0.27, but it also affected 0.25. It becomes apparent
with many servers (I'm using it on 20 servers currently). The list gets
generated in no particular order, and when #12 is down, it stops right there
and doesn't complete.

Let me know if you need more info.

hany
Post by seth vidal
Post by seth vidal
Post by Hany Fahim
Hey Folks,
I've been a happy user of func for over a year now and loving it. I've
been running func-inventory on a set of machines for a while and I've
noticed that whenever one (or more) server is down, func-inventory
stops in it's tracks complaining about 'connection refused' and never
completes the run on the rest of the machines. I've attached a patch
for inventory.py which essentially allows the script to continue with
the rest of the servers in the list (changed a 'break' to
'continue'). This is my first patch being submitted to the list, so
please let me know if I'm not following standard procedure.
What ver of func is this? I can't seem to replicate this behavior on my
test systems.
When 2 of the 3 minions are down the func-inventory call completes for
the one that is up.
when I bring up either of the other 2 it still completes.
It doesn't appear to be outputting about the other downed hosts -which
is still an issue -but not quite the same.
thoughts?
okay -verified -your patch fixes the reporting of which hosts are down.
-sv
seth vidal
2011-03-16 14:36:18 UTC
Permalink
Post by Hany Fahim
Hey Seth,
Just FYI, I'm using 0.27, but it also affected 0.25. It becomes
apparent with many servers (I'm using it on 20 servers currently). The
list gets generated in no particular order, and when #12 is down, it
stops right there and doesn't complete.
I'm happy to apply your patch b/c it fixes the output of what hosts are
down but are you sure it stops processing them entirely? And doesn't
just stop outputting what it is doing?


-sv
Hany Fahim
2011-03-16 14:49:27 UTC
Permalink
Yes, the 'break' causes it to break out of the for loop. I'm running this on
CentOS 5.5, with the default python 2.4:

# certmaster-ca --list-signed | wc -l
20

# /usr/bin/func-inventory -v | grep 'system inventory' | wc -l
-- connection refused: server12
11

Now if I apply the patch which changes it to a 'continue' and run inventory
again, I get all the hosts that are up:

# /usr/bin/func-inventory -v | grep system | wc -l
-- connection refused: server12
-- connection refused: server18
18

And indeed, I can verify that all hosts get their inventories updated with
the patch. Hope this clears things up.

hany
Post by seth vidal
Post by Hany Fahim
Hey Seth,
Just FYI, I'm using 0.27, but it also affected 0.25. It becomes
apparent with many servers (I'm using it on 20 servers currently). The
list gets generated in no particular order, and when #12 is down, it
stops right there and doesn't complete.
I'm happy to apply your patch b/c it fixes the output of what hosts are
down but are you sure it stops processing them entirely? And doesn't
just stop outputting what it is doing?
-sv
seth vidal
2011-03-16 15:49:36 UTC
Permalink
Post by Hany Fahim
Yes, the 'break' causes it to break out of the for loop. I'm running
okay. I've applied it to my local branch and I'll push it upstream soon.

thank you.
-sv

Loading...