4

I've installed ubuntu maas server, and a couple of nodes. Everything went right, just for one node, now with status "Allocated to...". Question is, how do i delete this node. I've tried following :

cobbler system remove --name=xxx

The node seems to be removed (cobbler system list) but is still visible in /MAAS webui, even after several reboots.

Any hint ?

6 Answers 6

3

maas has its own database, api, and management tools, directly removing things from cobbler is not supported.

1
  • thanks for your answer. Any link to the maas api documentation ? May 25, 2012 at 9:13
1
sudo maas shell
> from maasserver.models import Node
> node = Node.objects.get(hostname='myhostname')
> node.delete()
1

If this problem appeared after juju bootstrap, you can use

juju destroy-environment

maas flush will rebuild maas enviroment, that's not a good idea.

1

I faced this problem recently and I'll post here even if this is a very old question. In may case, the node was already allocated to MAAS, so I first had to de-allocate it (with release()) and then delete it. I used the following commands:

sudo maas shell
>>> from maasserver.models import Node
>>> node = Node.objects.get(hostname='node-name')
>>> node.release()
>>> node.delete()
1
  • It is very good to answer old questions! The idea of the StackExchange sites is to collect good questions and good answers over time - it's not only about answering questions, also building a knowledge base. And if the question was still not answered, but you hould answer it, you have given back a piece of information that not many people have - so it's precious, Thanks! Aug 22, 2014 at 10:37
0

Try to use after that cobbler command... maas flush. It will reset your maasdb.

0

I faced the same problem. I deployed a testing system and just use

sudo maas flush

but this will remove all tables from your system and start from scratch. will be also useful the

cobbler system remove --name

with the old nodes

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .