Member since
03-23-2017
5
Posts
0
Kudos Received
0
Solutions
03-28-2017
02:35 PM
Thank you for all the input! 🙂
... View more
03-27-2017
02:30 PM
Hi Darren, Thank you very much for a quick response. Please find attached the screenshot displaying the error. The error says "atleast one role must be started". I had to write a custom stopRunner for the service as the roles were used to start a spark job which escapes the Cloudera Manager's stop action. Please let me know how I could fix this or if I can skip the "abruptly stop". Thank you. Regards, Chandni Shankar
... View more
03-25-2017
10:35 AM
Thank you very much Darren. That clarifies my question on the Stop action. 1. I performed a service-level stop to stop all my roles, it is killing all my processes and an exit 0 is appearing, however, I am getting an "Abruptly stop the remaining roles" (in my step 2/2 of the Gracefully stop the service) which fails because there aren't any more remaining roles. How can I prevent the "Abruptly stop the remaining roles" being called? Will the framework always call this or when would it call the same? Would you please point out where I am going wrong? 2. If I were to write a custom service command for the CSD, is there a way to get the roles selected (Service -> instances -> actions for selected menu) that should execute the command, in the control script?
... View more
03-24-2017
02:26 PM
I have written a CSD that has several roles. I am ideally trying to stop the selected roles in the "actions for selected" menu in the Service -> instances tab. To invoke the "stop" action for a role, I tried writing a stopRunner similar to the startRunner fo the role "roles" : [ { "name" : "ECHO_WEBSERVER", "label" : "Web Server", "pluralLabel" : "Web Servers", "startRunner" : { "program" : "scripts/control.sh", "args" : [ "start" ], "environmentVariables" : { "WEBSERVER_PORT" : "${port_num}" } }, "stopRunner" : { "program" : "scripts/control.sh", "args" : [ "stop" ] } } ] However, that didn't work and tried "stopRunner" similar to the service syntax "roles" : [ { "name" : "ECHO_WEBSERVER", "label" : "Web Server", "pluralLabel" : "Web Servers", "startRunner" : { "program" : "scripts/control.sh", "args" : [ "start" ], "environmentVariables" : { "WEBSERVER_PORT" : "${port_num}" } }, "stopRunner" : { "runner" : { "program" : "scripts/control.sh", "args" : ["stop"] }, "timeout" : 180000, "masterRole" : "ECHO_WEBSERVER" } } ] That didn't work either. So I moved to writing a service command for performing the stop action for the selected roles. 1. How would I know which roles are selected? How can I track it in the control.sh? 2. Is there a better way to stop a role individually in a CSD? Your input is much appreciated. Thanks in advance.
... View more
Labels:
- Labels:
-
Cloudera Manager