Comment 3 for bug 1419201

Revision history for this message
Andrew Woodward (xarses) wrote :

reproduced on:

{"build_id": "2015-02-05_22-55-01", "ostf_sha": "6c046b69d29021524906109f18092363505ee222", "build_number": "101", "release_versions": {"2014.2-6.1": {"VERSION": {"build_id": "2015-02-05_22-55-01", "ostf_sha": "6c046b69d29021524906109f18092363505ee222", "build_number": "101", "api": "1.0", "nailgun_sha": "d6c6d63600e3b36606be332b23a0c5490a00fbcf", "production": "docker", "python-fuelclient_sha": "521c2491f7f04f31d8c85db68499cd193d4904e3", "astute_sha": "cf25925680814745facc7ffaf1e0b08eed6f9cb5", "feature_groups": ["mirantis"], "release": "6.1", "fuelmain_sha": "", "fuellib_sha": "bc99ea769cd67121f91f49c48dffca58e3f53fdf"}}}, "auth_required": true, "api": "1.0", "nailgun_sha": "d6c6d63600e3b36606be332b23a0c5490a00fbcf", "production": "docker", "python-fuelclient_sha": "521c2491f7f04f31d8c85db68499cd193d4904e3", "astute_sha": "cf25925680814745facc7ffaf1e0b08eed6f9cb5", "feature_groups": ["mirantis"], "release": "6.1", "fuelmain_sha": "", "fuellib_sha": "bc99ea769cd67121f91f49c48dffca58e3f53fdf"}

[root@nailgun ~]# fuel node
id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
---|----------|------------------|---------|------------|-------------------|-------|---------------|--------|---------
2 | discover | Untitled (63:77) | None | 10.110.0.5 | 64:00:61:db:63:77 | | | True | None
1 | discover | Untitled (4a:ff) | None | 10.110.0.3 | 64:ae:59:a6:4a:ff | | | True | None
3 | discover | Untitled (32:a9) | None | 10.110.0.4 | 64:d6:8a:19:32:a9 | | | True | None
[root@nailgun ~]# fuel env
id | status | name | mode | release_id | changes | pending_release_id
---|--------|------|------|------------|---------|-------------------

[root@nailgun ~]# fuel env --create --name test --rel 2 --net neutron --nst vlan --mode ha
Environment 'test' with id=1, mode=ha_compact and network-mode=neutron was created!
[root@nailgun ~]# fuel --env 1 set node 1 --role controller
id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
---|--------|------|---------|----|-----|-------|---------------|--------|---------

[root@nailgun ~]# fuel --env 1 node set --node 1 --role controller
Nodes [1] with roles ['controller'] were added to environment 1
[root@nailgun ~]# fuel --env 1 node set --node 2 --role compute
Nodes [2] with roles ['compute'] were added to environment 1
[root@nailgun ~]# fuel --env 2 node --provision --node 2
Started provisioning nodes [2].
[root@nailgun ~]#
[root@nailgun ~]# fuel --env 2 node --node 2 --tasks hiera
Started tasks ['hiera'] for nodes nodes [2].
[root@nailgun ~]# ssh node-2 -C 'hiera nodes | grep role'
Warning: Permanently added 'node-2' (RSA) to the list of known hosts.
  "role"=>"controller",
  "role"=>"compute",
[root@nailgun ~]# fuel --env 1 deployment --default
Default deployment info was downloaded to /root/deployment_1
[root@nailgun ~]# grep role /root/deployment_1/
compute_2.yaml primary-controller_1.yaml
[root@nailgun ~]# grep role /root/deployment_1/compute_2.yaml
  roles:
  role: primary-controller
  role: compute
role: compute
[root@nailgun ~]# fuel --env 2 node --node 2 --tasks hiera ; sleep 20
Started tasks ['hiera'] for nodes nodes [2].
[root@nailgun ~]# ssh node-2 -C 'hiera nodes | grep role'
Warning: Permanently added 'node-2' (RSA) to the list of known hosts.
  "role"=>"primary-controller",
  "role"=>"compute",
[root@nailgun ~]#

interestingly, fuel --env 1 deployment --default changed the result. The first controller became the primary controller as observed by @adidenko