Re: custom master service can not stop
Not much to go with based on your example, as I assume you removed sensitive code that actually does the stop. All I can suggest is to make sure the stop actually stops the process and don't sit in a loop forever. Also, it's not the stop that tells the UI a component is "stopped" or not, it's the status call. On Thu, Mar 29, 2018 at 8:33 AM, wrote: > After waiting about 1 hour, it always print log as below and failed > finally: > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > 2018-03-29 20:15:35,835 - Waiting for actual component stop > > - Original Message - > From: "xiang dai" > To: dev@ambari.apache.org > Sent: Thursday, March 29, 2018 8:14:47 PM > Subject: custom master service can not stop > > Hi! > > I add a master service as below: > > 2.0 > > > YUM > YUM > Yum Service > 1.0.0 > > > YUM_MASTER > Yum Master > MASTER > 1 > > scripts/master.py > PYTHON > 600 > > > > YUM_SLAVE > Yum Slave > SLAVE > 1+ > > scripts/slave.py > PYTHON > 600 > > > > > > any > > > > > > > master.py: > > class Master(Script): > def install(self, env): > print 'Install Yum' > > def start(self, env): > print 'Start Yum' > > def stop(self, env): > print 'Stop Yum' > > def status(self, env): > print 'Test Yum' > > if __name__ == "__main__": > Master().execute() > > slave.py: > > class Slave(Script): > def install(self, env): > print 'Wait for Yum_Master install finish...' > > def start(self, env): > print 'Wait for Yum_Master install finish...' > > def stop(self, env): > print 'Wait for Yum_Master stop finish...' > > def status(self, env): > print 'Wait for Yum_Master test finish...' > > if __name__ == "__main__": > Slave().execute() > > I install it successfully, but when stop on the web UI, the master can not > stop: > > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > Test Yum > 2018-03-29 19:12:54,068 - Waiting for actual component stop > > It hang at 35%. > > I follow https://cwiki.apache.org/confluence/display/AMBARI/ > Defining+a+Custom+Service, did i miss something import? > > Best wishes >
Re: custom master service can not stop
After waiting about 1 hour, it always print log as below and failed finally: Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum 2018-03-29 20:15:35,835 - Waiting for actual component stop - Original Message - From: "xiang dai" To: dev@ambari.apache.org Sent: Thursday, March 29, 2018 8:14:47 PM Subject: custom master service can not stop Hi! I add a master service as below: 2.0 YUM YUM Yum Service 1.0.0 YUM_MASTER Yum Master MASTER 1 scripts/master.py PYTHON 600 YUM_SLAVE Yum Slave SLAVE 1+ scripts/slave.py PYTHON 600 any master.py: class Master(Script): def install(self, env): print 'Install Yum' def start(self, env): print 'Start Yum' def stop(self, env): print 'Stop Yum' def status(self, env): print 'Test Yum' if __name__ == "__main__": Master().execute() slave.py: class Slave(Script): def install(self, env): print 'Wait for Yum_Master install finish...' def start(self, env): print 'Wait for Yum_Master install finish...' def stop(self, env): print 'Wait for Yum_Master stop finish...' def status(self, env): print 'Wait for Yum_Master test finish...' if __name__ == "__main__": Slave().execute() I install it successfully, but when stop on the web UI, the master can not stop: Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum 2018-03-29 19:12:54,068 - Waiting for actual component stop It hang at 35%. I follow https://cwiki.apache.org/confluence/display/AMBARI/Defining+a+Custom+Service, did i miss something import? Best wishes
custom master service can not stop
Hi! I add a master service as below: 2.0 YUM YUM Yum Service 1.0.0 YUM_MASTER Yum Master MASTER 1 scripts/master.py PYTHON 600 YUM_SLAVE Yum Slave SLAVE 1+ scripts/slave.py PYTHON 600 any master.py: class Master(Script): def install(self, env): print 'Install Yum' def start(self, env): print 'Start Yum' def stop(self, env): print 'Stop Yum' def status(self, env): print 'Test Yum' if __name__ == "__main__": Master().execute() slave.py: class Slave(Script): def install(self, env): print 'Wait for Yum_Master install finish...' def start(self, env): print 'Wait for Yum_Master install finish...' def stop(self, env): print 'Wait for Yum_Master stop finish...' def status(self, env): print 'Wait for Yum_Master test finish...' if __name__ == "__main__": Slave().execute() I install it successfully, but when stop on the web UI, the master can not stop: Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum Test Yum 2018-03-29 19:12:54,068 - Waiting for actual component stop It hang at 35%. I follow https://cwiki.apache.org/confluence/display/AMBARI/Defining+a+Custom+Service, did i miss something import? Best wishes