Unable to add rack controller

Bug #1885005 reported by Nick Niehoff
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Alberto Donato
2.8
Fix Released
High
Alberto Donato

Bug Description

When installing a fresh 2.8 deployment with separate region and rack controllers adding the rack controller fails. Steps to reproduce:

1. Setup region controller following https://maas.io/docs/install-from-a-snap

sudo snap install maas --channel=2.8/stable
sudo snap install maas-test-db --channel=2.8/stable
sudo maas init region --database-uri maas-test-db:///
sudo maas createadmin

2. Add rack
sudo maas init rack
MAAS URL [default=http://10.29.157.66:5240/MAAS]: http://10.29.157.93:5240/MAAS
Secret:
Secret: 917fce44021b67e405e71f48d456af30
Traceback (most recent call last):
  File "/snap/maas/7328/bin/maas", line 33, in <module>
    sys.exit(load_entry_point('maas==2.8.0', 'console_scripts', 'maas')())
  File "/snap/maas/7328/lib/python3.6/site-packages/maascli/__init__.py", line 45, in main
    options.execute(options)
  File "/snap/maas/7328/lib/python3.6/site-packages/maascli/snappy.py", line 661, in __call__
    raise exc
  File "/snap/maas/7328/lib/python3.6/site-packages/maascli/snappy.py", line 658, in __call__
    self.handle(options)
  File "/snap/maas/7328/lib/python3.6/site-packages/maascli/snappy.py", line 1005, in handle
    set_rpc_secret(rpc_secret)
  File "/snap/maas/7328/lib/python3.6/site-packages/maascli/snappy.py", line 318, in set_rpc_secret
    with open(secret_path, "w") as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/var/snap/maas/7328/var/lib/maas/secret'

Tags: sts

Related branches

Revision history for this message
Nick Niehoff (nniehoff) wrote :

Workaround on the rack:

sudo mkdir -p /var/snap/maas/7328/var/lib/maas/
sudo maas init rack
sudo cp /var/snap/maas/7328/var/lib/maas/secret /var/snap/maas/common/maas/secret
sudo snap restart maas

tags: added: sts
Alberto Donato (ack)
summary: - [2.8, snap] Unable to add rack controller
+ Unable to add rack controller
Alberto Donato (ack)
Changed in maas:
importance: Undecided → High
assignee: nobody → Alberto Donato (ack)
status: New → In Progress
Alberto Donato (ack)
Changed in maas:
milestone: none → 2.9.0b1
Revision history for this message
Erlon R. Cruz (sombrafam) wrote :

Hi Alberto,

Can you also target a backport to 2.8? Otherwise,
everyone going through 2.8 might hit this.

Erlon

Changed in maas:
status: In Progress → Fix Committed
Revision history for this message
Alberto Donato (ack) wrote :

Yes, done

Lee Trager (ltrager)
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.