Mcollective and Bamboo issue

72 views
Skip to first unread message

Guy Knights

unread,
Aug 11, 2014, 2:56:45 PM8/11/14
to puppet...@googlegroups.com
I'm trying to execute a custom mcollective RPC call via Atlassian Bamboo and have run into a frustrating issue. I've posted this question to the Bamboo community help page but figured I could try asking the same thing here in case anyone's run into this problem as well, even though I suspect it's not actually an Mcollective issue.

Basically, my custom RPC call restarts an instance of Glassfish. It's a simple call to Mcollective's "run()" command and it works fine when I run it from the command line on the bamboo server. However, if I run it as a "script" task from within bamboo, it just hangs indefinitely. I wondered if it's something to do with mco's run command opening subshells and this somehow affecting what bamboo is getting back, but AFAIK it shouldn't be an issue. I've tested the output received on the command line, and the exit code seems to be returned fine.

Does anyone have any ideas or suggestions? Anyone using mcollective in this way that has encountered an issue like this?

Thanks,
Guy


R.I.Pienaar

unread,
Aug 11, 2014, 3:01:06 PM8/11/14
to puppet...@googlegroups.com
Donno about bamboo but if you're doing this with 'mco rpc' then its probably
a case of bamboo not closing STDIN which the mco rpc command tries to read
and never gets anywhere with :( I think there's a ticket open somewhere to
disable this reading of STDIN but thats the usual reason for this kind of hang

Guy Knights

unread,
Aug 11, 2014, 4:00:54 PM8/11/14
to puppet...@googlegroups.com
Ahh...that explains a lot. I modified my RPC client to make the shell commands write the output (including error) to a log file, and when it's run via bamboo it never writes to the log file. So it seems like it doesn't even get to the point of executing the shell command, which seems very possible if mco is waiting for stdin to close.

Do you have any suggestions for band-aid fixes to get around this issue (from the mcollective side)?

Thanks,
Guy

R.I.Pienaar

unread,
Aug 11, 2014, 4:03:50 PM8/11/14
to puppet...@googlegroups.com


----- Original Message -----
> From: "Guy Knights" <guy.k...@gmail.com>
> To: puppet...@googlegroups.com
> Sent: Monday, August 11, 2014 9:00:53 PM
> Subject: Re: [Puppet Users] Mcollective and Bamboo issue
>
> Ahh...that explains a lot. I modified my RPC client to make the shell
> commands write the output (including error) to a log file, and when it's
> run via bamboo it never writes to the log file. So it seems like it doesn't
> even get to the point of executing the shell command, which seems very
> possible if mco is waiting for stdin to close.
>
> Do you have any suggestions for band-aid fixes to get around this issue
> (from the mcollective side)?

you can write your own application plugin - 'mco your_app ....' which then
wont do this.

https://docs.puppetlabs.com/mcollective/reference/plugins/application.html

Other than that, it would require bamboo to have an option to close STDIN
which is quite unlikely :(

Guy Knights

unread,
Aug 11, 2014, 6:19:20 PM8/11/14
to puppet...@googlegroups.com
Ok, I'll take a look at that. Thanks!
Reply all
Reply to author
Forward
0 new messages