Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.12.66: how to change an interface address #128

Open
jouvin opened this issue Jan 3, 2019 · 5 comments
Open

1.12.66: how to change an interface address #128

jouvin opened this issue Jan 3, 2019 · 5 comments
Assignees

Comments

@jouvin
Copy link
Contributor

jouvin commented Jan 3, 2019

I need to change the address associated with a host interface. aq update interface help says that it should be done with add add/del interface address. But if I try to add an address to the interface with:

 aq add interface address --hostn testaq.lal.in2p3.fr --int eth0 --ip 134.158.76.96

I get the error:

Bad Request: Public Interface eth0 of machine testaq.lal.in2p3.fr already has an IP address.

and if I try to delete the existing address first with:

lx6/jouvin % aq del interface address --hostn testaq.lal.in2p3.fr --int eth0 --ip 134.158.76.239

I get:

Bad Request: The primary IP address of a hardware entity cannot be removed.

What did I do wrong?

@jrha
Copy link
Member

jrha commented Jan 7, 2019

If it is the primary address, I believe you have to delete and re-add the host.

@jouvin
Copy link
Contributor Author

jouvin commented Jan 7, 2019

I find it a little bit cumbersome to have to delete/re-add a host to change its primary address... Any good reason for this or is it something that we could improve?

@jrha
Copy link
Member

jrha commented Jan 7, 2019

No idea, design decision? @ned21 might have an idea about the motivation behind it.
At RAL we don't normally allow hosts to be renamed because it causes a record keeping nightmare.

@gombasg
Copy link
Contributor

gombasg commented Jan 7, 2019

If it is not the primary address, then you need to delete/re-add it. If it is the primary address, then a little un-intuitively, aq update machine --machine ... --ip ... is what you need.

@jouvin
Copy link
Contributor Author

jouvin commented Jan 7, 2019

@gombasg thanks for the info, I'll add it to the documentation. BTW, if it is not the primary address you need to delete/readd the interface address (according to the help), not the host, isn't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants