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 ?

Jorge Castro
  • 71,754

6 Answers6

3

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

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.

Jorge Castro
  • 71,754
Michael
  • 111
1
sudo maas shell
> from maasserver.models import Node
> node = Node.objects.get(hostname='myhostname')
> node.delete()
cheez0r
  • 31
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()
  • 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! – Volker Siegel Aug 22 '14 at 10:37
0

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

Zimika
  • 11
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