Wednesday, May 8, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3789  / 2 Years ago, mon, february 28, 2022, 8:02:11

I have machines running on MaaS using Juju. Some of them failed to deploy because a hook didn't run because of an (invalid) setting I set in the config. In the Jju UI, I tried marking them as resolved, and then trying to remove them (and repeated through a few cycles of them going green and and then red).



(I believe doing resolve + remove will make juju not get stuck on the fact that the hook didn't work, and let juju just get rid of the machine.)



Now I have units that seem stuck and say



    agent-state: error
agent-state-info: 'hook failed: "install"'
agent-version: 1.16.0.1
life: dying


in juju status. I've tried destroying the units and the machines they are on. Is there any way to just give up on those units and recycle the machines the are on for another try?



I also tried marking the units resolved on the command line, but I'm getting conflicting messages. I get ERROR cannot set resolved mode for unit "ceph-osd/1": already resolved when I tried to mark it resolved, but status says the same error message above after that when I run juju status



    agent-state: error
agent-state-info: 'hook failed: "install"'
life: dying


Update: I just came back after an hour or two, and found that one of the units I was having trouble with went away. So, waiting did work.


More From » juju

 Answers
0

The only way I've found to kill them (fast) is destroying the environment.



juju destroy-environment


Of course, since rebuilding the environment from the ground up could be rather drastic, I would suggest waiting for a while before doing this. Sometimes, it just takes a while for all the hooks finish executing and then hopefully the service should no longer be stuck in a dying state. Note that to actually free up the machine, after you have destroyed the unit (juju destroy-unit) you need to run the juju destroy-machine (with the machine number) to release it. Note that juju destroy-machine will not terminate a machine that is currently acting as a unit, so it will not release a unit if it is currently in the dying state.



I presume you were starting to build your environment. It would be helpful to check the log files of the machines (I also check them but not to find why they don't die but rather why they didn't complete).


[#28745] Tuesday, March 1, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rcraftemur

Total Points: 118
Total Questions: 119
Total Answers: 144

Location: Turks and Caicos Islands
Member since Sun, Mar 7, 2021
3 Years ago
rcraftemur questions
;