collins
collins copied to clipboard
Error updating an ip address
I've been attempting to change an ip address assign to an asset. I'm using:
- Collins 1.3.0
- Java 1.7.0_76
- Ruby 1.9.3-p547
When I attempt to change a IP address using the following:
collins-shell ip_address update 76.96.203.77 --tag=server1 --address=76.96.203.75
I receive the following response:
fatal unable to run command '/home/vagrant/.anyenv/envs/rbenv/versions/1.9.3-p547/bin/collins-shell ip_address update 76.96.203.77 --tag=server1 --address=76.96.203.75'
exception Error processing request:
********************************************************************************
details
Response Code: 500
URI: /api/asset/server1/address
When I try the same operation through the API:
http://collins:8080/api/asset/server1/address
with the body of:
{
"old_address": "76.96.203.13",
"address": "76.96.203.11",
"tag": "server1",
"pool": "DATACENTER1__SIGNALLING"
}
I received the following response:
{"status":"server_error:internal server error","data":{"SUCCESS":false}}
Is this some kind of error?
NOTE: I wasn't able to post a message to the google group.
Hi @brad-babb
Do you have any IP pools configured? What is the output of this api call?
Can you check the collins application log and see if any errors appear there?
Thanks,
P.S. I'll make sure to take a look at how the google group is set up. Sorry about that.
Hi @Primer42
Yes, I have a few pools configured in non-strict mode. Here is the response from the pools
API call:
{
"data": {
"POOLS": [
{
"BROADCAST": "76.96.203.191",
"GATEWAY": "76.96.203.129",
"NAME": "DATACENTER1_OOB",
"NETWORK": "76.96.203.128/26",
"POSSIBLE_ADDRESSES": 62,
"SPECIFIED_GATEWAY": "76.96.203.129",
"START_ADDRESS": "Unspecified"
},
{
"BROADCAST": "76.96.203.127",
"GATEWAY": "76.96.203.65",
"NAME": "DATACENTER1_MANAGEMENT",
"NETWORK": "76.96.203.64/26",
"POSSIBLE_ADDRESSES": 62,
"SPECIFIED_GATEWAY": "76.96.203.65",
"START_ADDRESS": "Unspecified"
},
{
"BROADCAST": "76.96.203.63",
"GATEWAY": "76.96.203.1",
"NAME": "DATACENTER1_SIGNALLING",
"NETWORK": "76.96.203.0/26",
"POSSIBLE_ADDRESSES": 62,
"SPECIFIED_GATEWAY": "76.96.203.2",
"START_ADDRESS": "Unspecified"
}
]
},
"status": "success:ok"
}
I've assigned an IP to the asset from both the DATACENTER1_SIGNALLING
and the DATACENTER1_MANAGEMENT
pools. My ipAddress
configuration in the production.conf
file looks like this:
ipAddresses {
strict = false
pools {
datacenter1_signalling {
network = "76.96.203.0/26"
gateway = "76.96.203.2"
}
datacenter1_management {
network = "76.96.203.64/26"
gateway = "76.96.203.65"
}
datacenter1_oob {
network = "76.96.203.128/26"
gateway = "76.96.203.129"
}
}
}
I don't have control over my IP space or what I can assign to each asset, so after I realized that the assignment of IP address from the pool was auto-assigned (no parameter to pass in the requested IP address during assignment that I could find), I thought that I could simply assign the IP address and update it afterwards in a 2 step process. The update
is what is failing.
@Primer42
Also note that I have attempted the assignment of the ip to an asset, and the update in both strict and non-strict mode.
It may be having trouble with the START_ADDRESS not being set. Can you try specifying that value? Also, did you see any errors in the application log?
@Primer42
Sorry forgot to include the logs. No, nothing that looked like an error, the only thing the log shows is something like:
2015-04-22 15:22:27,035 - [INFO] - from util.security.PermissionsLoader in New I/O server worker #1-2 Refreshing permissions from /home/bcv/build/collins/conf/permissions.yaml
@Primer42
I'll set the START_ADDRESS, and try again. Is the process that I'm using correct for attempting to assign the an specific ip address to an asset?
@Primer42
Where did you mean the start address, in the configuration? In that case you're talking about the startAddress
configuration entry right?
@Primer42
I've update the production.conf
with the following ipAddresses
configuration:
ipAddresses {
strict = false
pools {
datacenter1_signalling {
startAddress = "76.96.203.3"
network = "76.96.203.0/26"
gateway = "76.96.203.2"
}
datacenter1_management {
startAddress = "76.96.203.66"
network = "76.96.203.64/26"
gateway = "76.96.203.65"
}
datacenter1_oob {
startAddress = "76.96.203.130"
network = "76.96.203.128/26"
gateway = "76.96.203.129"
}
}
}
re-ran the collins-shell
command, with the same result.
@brad-babb did you restart collins after changing production.conf? I think it needs a restart to see those changes.
@Primer42
Yes.
@byxorna