{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/32864","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/32864/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/32864/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/32864/events","html_url":"https://github.com/saltstack/salt/issues/32864","id":151138452,"number":32864,"title":"salt-cloud doesn't map new minion to new salt master/syndic","user":{"login":"bradthurber","id":3045456,"avatar_url":"https://avatars.githubusercontent.com/u/3045456?v=3","gravatar_id":"","url":"https://api.github.com/users/bradthurber","html_url":"https://github.com/bradthurber","followers_url":"https://api.github.com/users/bradthurber/followers","following_url":"https://api.github.com/users/bradthurber/following{/other_user}","gists_url":"https://api.github.com/users/bradthurber/gists{/gist_id}","starred_url":"https://api.github.com/users/bradthurber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradthurber/subscriptions","organizations_url":"https://api.github.com/users/bradthurber/orgs","repos_url":"https://api.github.com/users/bradthurber/repos","events_url":"https://api.github.com/users/bradthurber/events{/privacy}","received_events_url":"https://api.github.com/users/bradthurber/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P4","name":"P4","color":"031a39"},{"url":"https://api.github.com/repos/saltstack/salt/labels/RIoT","name":"RIoT","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Salt-Cloud","name":"Salt-Cloud","color":"006b75"},{"url":"https://api.github.com/repos/saltstack/salt/labels/ZD","name":"ZD","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":3054,"closed_issues":3626,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2016-05-16T19:55:59Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-04-26T13:41:32Z","updated_at":"2016-05-16T20:57:09Z","closed_at":null,"body":"### Description of Issue/Question\r\nIn the salt-cloud map docs, there is a section for [setting up new salt masters](https://docs.saltstack.com/en/develop/topics/cloud/map.html#setting-up-new-salt-masters)\r\n\r\nIn my environment, I am running salt-cloud from a master of masters (\"mom\") and am trying to use a map file to create a syndic master and its minions by specifying one of the hosts should be the new master via `make_master:True` parameter.\r\n\r\nUnfortunately, I am encountering three problems:\r\n\r\n(1) On run of the map, salt-cloud creates the syndic, but at the end it errors-out with the following message\r\n\r\n```\r\nError: There was a query error: Host for new master l-syndic-101.mycompany.com was not found, aborting map\r\n```\r\n\r\nThe host is in DNS, I can ping the host from the \"mom\", so I'm not sure why salt-cloud doesn't like this host.\r\n\r\nI figure at this point, I can just try the map file again. Salt-cloud sees that the syndic exists so goes on to create the minion. The salt-minion service fails to start due to the remaining two problems\r\n\r\n(2) The minion's config file is showing `master: salt` instead of the expected `master: l-syndic-101.mycompany.com`\r\n\r\n(3) If I do a 'salt-key' on the \"mom\" I find the minion's key in the accepted key list.\r\n\r\nIt seems what I am trying to do is not working at all. Is this expected functionality? Is it possible to build a syndic and it's minions from the mom from a salt-cloud map file?\r\n\r\n### Setup\r\nmap file `lab-generic`\r\n```\r\nlab-generic-syndic:\r\n  - l-syndic-101.mycompany.com:\r\n      make_master: True\r\n      minion:\r\n        master: s-cdc-stmom-01.mycompany.com\r\n        local_master: True\r\n      master:\r\n        syndic_master: s-cdc-stmom-01.mycompany.com\r\nlab-generic-tiny:\r\n  - l-minion-101.mycompany.com\r\n```\r\n\r\nprofile `lab-generic-syndic`\r\n```\r\nlab-generic-syndic:\r\n  devices:\r\n    network:\r\n      Network adapter 1:\r\n        name: VLAN641\r\n        switch_type: standard\r\n  grains:\r\n    platform:\r\n      name: lab\r\n      ou: kar\r\n      realm: nonprod\r\n    roles:\r\n      - syndic\r\n  memory: 2GB\r\n  num_cpus: 1\r\n  provider: lab\r\n  clonefrom: rhel6xnonprodtemplate.mycompany.com\r\n  datacenter: CARMEL\r\n  datastore: Pure-CDC\r\n  cluster: CVEP-LX\r\n  folder: JBOSS\r\n  ssh_username: REDACTED\r\n  password: REDACTED\r\n  domain: REDACTED\r\n```\r\n\r\nprofile `lab-generic-tiny`\r\n```\r\nlab-generic-tiny:\r\n  devices:\r\n    network:\r\n      Network adapter 1:\r\n        name: VLAN641\r\n        switch_type: standard\r\n  grains:\r\n    platform:\r\n      name: lab\r\n      ou: kar\r\n      realm: nonprod\r\n  memory: 2GB\r\n  num_cpus: 1\r\n  provider: lab\r\n  clonefrom: rhel6xnonprodtemplate.mycompany.com\r\n  datacenter: CARMEL\r\n  datastore: Pure-CDC\r\n  cluster: CVEP-LX\r\n  folder: JBOSS\r\n  ssh_username: REDACTED\r\n  password: REDACTED\r\n  domain: REDACTED\r\n```\r\n\r\nprovider `lab`\r\n```\r\nlab:\r\n  driver: vmware\r\n  user: 'REDACTED'\r\n  password: 'REDACTED'\r\n  url: 'REDACTED'\r\n  protocol: 'https'\r\n  port: 443\r\n```\r\n\r\n### Steps to Reproduce Issue\r\n\r\nsalt-cloud -m lab-generic -l debug -P\r\n\r\n### Versions Report\r\n\r\nsalt --versions from the mom. Other hosts should be similar\r\n\r\n```\r\nSalt Version:\r\n           Salt: 2015.8.8\r\n\r\nDependency Versions:\r\n         Jinja2: 2.7.3\r\n       M2Crypto: 0.20.2\r\n           Mako: 0.3.4\r\n         PyYAML: 3.11\r\n          PyZMQ: 14.5.0\r\n         Python: 2.6.6 (r266:84292, May 22 2015, 08:34:51)\r\n           RAET: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 4.0.5\r\n           cffi: 1.6.0\r\n       cherrypy: Not Installed\r\n       dateutil: 1.4.1\r\n          gitdb: Not Installed\r\n      gitpython: Not Installed\r\n          ioflo: Not Installed\r\n        libgit2: 0.20.0\r\n        libnacl: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.6\r\n   mysql-python: Not Installed\r\n      pycparser: 2.14\r\n       pycrypto: 2.6.1\r\n         pygit2: 0.20.3\r\n   python-gnupg: Not Installed\r\n          smmap: Not Installed\r\n        timelib: Not Installed\r\n\r\nSystem Versions:\r\n           dist: redhat 6.7 Santiago\r\n        machine: x86_64\r\n        release: 2.6.32-504.el6.x86_64\r\n         system: Red Hat Enterprise Linux Server 6.7 Santiago\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/219545478","html_url":"https://github.com/saltstack/salt/issues/32864#issuecomment-219545478","issue_url":"https://api.github.com/repos/saltstack/salt/issues/32864","id":219545478,"user":{"login":"techhat","id":287147,"avatar_url":"https://avatars.githubusercontent.com/u/287147?v=3","gravatar_id":"","url":"https://api.github.com/users/techhat","html_url":"https://github.com/techhat","followers_url":"https://api.github.com/users/techhat/followers","following_url":"https://api.github.com/users/techhat/following{/other_user}","gists_url":"https://api.github.com/users/techhat/gists{/gist_id}","starred_url":"https://api.github.com/users/techhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techhat/subscriptions","organizations_url":"https://api.github.com/users/techhat/orgs","repos_url":"https://api.github.com/users/techhat/repos","events_url":"https://api.github.com/users/techhat/events{/privacy}","received_events_url":"https://api.github.com/users/techhat/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T20:57:09Z","updated_at":"2016-05-16T20:57:09Z","body":"Hi @bradthurber.\r\n\r\n1) The error about the missing host is not a DNS error. Salt Cloud is telling you that it cannot find the host in any of the configured cloud providers.\r\n\r\n2) Once Salt Cloud has created a node, it will not make any changes to that node in subsequent calls. This is why it is not effecting the change."}}