salt icon indicating copy to clipboard operation
salt copied to clipboard

cloud.profile fails in orchestration

Open trebortech opened this issue 10 years ago • 2 comments

Description of Issue/Question

I have a working cloud profile config that deploys a windows box to AWS. It completes all the steps to include the state files listed in the profile. This works fine when I execute it from salt-cloud.

When I try to execute this profile inside of an orchestration file it fails to bootstrap the instance. It will deploy the instance and even set the name tag but does not bootstrap the new instance.

Nothing shows up in any log files and debug doesn't show any errors.

Setup

----------------- iis.conf  ----------------------
iis:
  provider: tt-aws
  image: ami-1fXXXX
  size: t2.medium
  minion:
    master: 10.X.X.X
    startup_states: sls
    sls_list:
      - sync
      - network
    mine_interval: 5
    grains:
      roles:
        - iis
      app:
        - webapp1
  win_deploy_auth_retries: 2
  win_deploy_auth_retry_delay: 5
  smb_port: 445
  win_installer: /etc/salt/cloud.deploy.d/Salt-Minion-2016.3.1-AMD64-Setup.exe
  win_username: Administrator
  win_password: XXXXX
  ssh_interface: private_ips
  network_interfaces:
    - DeviceIndex: 0
      SubnetId: subnet-0XXXXXX
      SecurityGroupId:
        - sg-3XXXXX
      allocate_new_eip: False

----------------- orch1.sls ----------------------

"Deploy IIS New Server":
  salt.function:
    - tgt: 'saltmaster'
    - name: cloud.profile
    - kwarg:
        profile:iis
        names:
          - iis1

Steps to Reproduce Issue

salt-cloud -p iis iis1 <---- works

salt-run state.orch orch1 <----- fails to bootstrap instance

Versions Report

Salt Version:
           Salt: 2016.3.1
Dependency Versions:
           cffi: Not Installed
       cherrypy: 6.0.1
       dateutil: Not Installed
          gitdb: 0.5.4
      gitpython: 0.3.2 RC1
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.21.1
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.3.0
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
   python-gnupg: Not Installed
         PyYAML: 3.10
          PyZMQ: 14.0.1
           RAET: Not Installed
          smmap: 0.8.2
        timelib: Not Installed
        Tornado: 4.4.1
            ZMQ: 4.0.4
System Versions:
           dist: Ubuntu 14.04 trusty
        machine: x86_64
        release: 3.13.0-74-generic
         system: Linux
        version: Ubuntu 14.04 trusty
Add Comment Collaps

trebortech avatar Aug 01 '16 22:08 trebortech

@trebortech if you run it with the cloud.profile execution module does it bootstrap like so:? salt '10*' cloud.profile linode_ubuntu14 ch3ll_test -ldebug I tested this with a linux VM and did not see the same behavior.

Ch3LL avatar Aug 03 '16 21:08 Ch3LL

I changed from executing a function in orchestration to using the cloud.profile runner and that took are of this issue.

----------------- orch1.sls ----------------------

"Deploy IIS New Server":
  salt.runner:
    - name: cloud.profile
    - prof: iis
    - instances:
      - demo-iis1

trebortech avatar Sep 04 '16 21:09 trebortech