Force rackd to communicate with different regiond server ip's

Asked by Alfred Stappenbeck

Followed directions and am on this version `sudo snap install --channel=3.4 maas`

I have a regiond MAAS install in AWS. That regiond server likes to think of itself as having private ips. Which is true, BUT it also has a public IP address that is accessible from the internet (confirmed with curl on port 4240).

I have a rackd computer that I'm trying to configure to talk to the regiond server. This starts out well, I give the https address url to the command `sudo maas init rack --maas-url https://....redacted/MAAS --secret ...also-redacted...`

when I check the logs of rackd I find that it's failing to perform RPC on the private ip address of the regiond server.

Soooo.... I need to force the public ip of the regiond server.

The docs I'm seeing don't really seem to address this issue for 3.4 so I'm going to go database crawling through your scheme and see if I can hack my way through it I guess.

please provide some indication of a less gross way to do this please.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alfred Stappenbeck (alfred-stokespace) said :
#1

A little digging and I can see where the private ips are stored in the scheme

table: maasserver_staticipaddress
column: ip

I'm assuming if I replace the ip in that column with the equivalent public ip then when my rackd registers it will be told about the correct ip. Lets hope so! fingers crossed.

Revision history for this message
Bernard Stafford (bernard010) said :
#2

Did you list and confirm all registered rack controllers ?
maas $PROFILE rack-controllers read | grep hostname | cut -d ‘"’ -f 4
https://maas.io/docs/configuring-maas-controllers#heading--list-rack-controllers

Revision history for this message
Alfred Stappenbeck (alfred-stokespace) said :
#3

@bernard010
your command failed for me.
I took off the cut pipe and
did this

maas $PROFILE rack-controllers read | grep hostname

that returned ...

usage: maas [-h] COMMAND ...

options:
  -h, --help show this help message and exit

drill down:
  COMMAND
    login Log in to a remote API, and remember its description and
                  credentials.
    logout Log out of a remote API, purging any stored credentials.
    list List remote APIs that have been logged-in to.
    refresh Refresh the API descriptions of all profiles.
    init Initialise MAAS in the specified run mode.
    config View or change controller configuration.
    status Status of controller services.
    migrate Perform migrations on connected database.
    apikey Used to manage a user's API keys. Shows existing keys unless
                  --generate or --delete is passed.
    configauth Configure external authentication.
    config-tls Configure MAAS Region TLS.
    config-vault Configure MAAS Region Vault integration.
    createadmin Create a MAAS administrator account.
    changepassword
                  Change a MAAS user's password.

https://maas.io/

argument COMMAND: invalid choice: 'rack-controllers' (choose from 'login', 'logout', 'list', 'refresh', 'init', 'config', 'status', 'migrate', 'reconfigure-supervisord', 'apikey', 'configauth', 'config-tls', 'config-vault', 'createadmin', 'changepassword')

Revision history for this message
Bernard Stafford (bernard010) said (last edit ):
#4

Note that on the UI, you can find complete instructions for adding a rack controller under the “Controllers” tab. Simply click on the button labelled, “Add rack controller” and choose the instructions relevant to your build model (snap or packages). The commands there will already include the correct MAAS URL and secret, so you can cut and paste them at the command line.

check what you have so far: sudo maas status

Revision history for this message
Alfred Stappenbeck (alfred-stokespace) said (last edit ):
#5

@bernard010
I think my question is being missed.

I was able to get that "Add" string and was able to issue it successfully. That's not the problem.

The rack server accepts that all initially. no problem.

The problem is that when you look at the rackd logs on that server it's all error messages mentioning the PRIVATE ip address of the region server. That private IP address isn't reachable from where the rack server is. So I need that private ip address to be the PUBLIC address (I mentioned that in my original issue). The public ip address is reachable fine, but it's not being handed to the rack server for RPC

Revision history for this message
Bernard Stafford (bernard010) said :
#6
Revision history for this message
Launchpad Janitor (janitor) said :
#7

This question was expired because it remained in the 'Open' state without activity for the last 15 days.