VMware Aria Automation Tools

  • 1.  Error install Salt-minion

    Posted Jul 04, 2024 06:14 PM

    I was trying install salt-minion from blueprint but it failed

    Error code:

    [
      {
        "return": "Exception occurred in runner deploy.minion: Traceback (most recent call last):\n  File \"/usr/lib/python3.7/site-packages//sseape/engines/sseapi_engine_sync.py\", line 223, in _run_runner\n    daemonize=False)\nTypeError: _proc_function() got an unexpected keyword argument 'instance'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/usr/lib/python3.7/site-packages/salt/client/mixins.py\", line 390, in low\n    data[\"return\"] = func(*args, **kwargs)\n  File \"/usr/lib/python3.7/site-packages/salt/loader/lazy.py\", line 149, in __call__\n    return self.loader.run(run_func, *args, **kwargs)\n  File \"/usr/lib/python3.7/site-packages/salt/loader/lazy.py\", line 1201, in run\n    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)\n  File \"/usr/lib/python3.7/site-packages/salt/loader/lazy.py\", line 1216, in _run_as\n    return _func_or_method(*args, **kwargs)\n  File \"/usr/lib/python3.7/site-packages//sseape/runners/deploy.py\", line 610, in minion\n    raise salt.exceptions.SaltException('Error in installing salt minion - {}'.format(str(ret)))\nsalt.exceptions.SaltException: Error in installing salt minion - {'null0null': {'Error': {'Not Deployed': 'Failed to start Salt on host null0null'}}}\n",
        "master_uuid": "c76e852d-fb5d-4014-912c-71bbf0a077c2",
        "minion_id": "saltstack_enterprise_installer",
        "jid": "20240704190413065786",
        "fun": "runner.deploy.minion",
        "alter_time": "2024-07-04T19:09:19.971035",
        "full_ret": {
          "fun": "runner.deploy.minion",
          "jid": "20240704190413065786",
          "user": "root",
          "_stamp": "2024-07-04T19:09:15.424557",
          "return": "Exception occurred in runner deploy.minion: Traceback (most recent call last):\n  File \"/usr/lib/python3.7/site-packages//sseape/engines/sseapi_engine_sync.py\", line 223, in _run_runner\n    daemonize=False)\nTypeError: _proc_function() got an unexpected keyword argument 'instance'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/usr/lib/python3.7/site-packages/salt/client/mixins.py\", line 390, in low\n    data[\"return\"] = func(*args, **kwargs)\n  File \"/usr/lib/python3.7/site-packages/salt/loader/lazy.py\", line 149, in __call__\n    return self.loader.run(run_func, *args, **kwargs)\n  File \"/usr/lib/python3.7/site-packages/salt/loader/lazy.py\", line 1201, in run\n    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)\n  File \"/usr/lib/python3.7/site-packages/salt/loader/lazy.py\", line 1216, in _run_as\n    return _func_or_method(*args, **kwargs)\n  File \"/usr/lib/python3.7/site-packages//sseape/runners/deploy.py\", line 610, in minion\n    raise salt.exceptions.SaltException('Error in installing salt minion - {}'.format(str(ret)))\nsalt.exceptions.SaltException: Error in installing salt minion - {'null0null': {'Error': {'Not Deployed': 'Failed to start Salt on host null0null'}}}\n",
          "success": false,
          "fun_args": [
            {
              "os": "windows",
              "master_id": "salt",
              "minion_id": "null0null",
              "airgap_install": false,
              "installer_file_name": null,
              "additional_minion_params": {}
            }
          ],
          "_master_path": [
            "saltstack_enterprise_installer"
          ]
        },
        "has_errors": true,
        "master": "salt",
        "fun_args": [
          {
            "os": "windows",
            "master_id": "salt",
            "minion_id": "null0null",
            "airgap_install": false,
            "installer_file_name": null,
            "additional_minion_params": {}
          }
        ],
        "cmd": null,
        "user": null,
        "job_name": null,
        "job_uuid": null,
        "tgt_name": null,
        "tgt_uuid": null,
        "low": null,
        "job_source": null
      }
    ]

    any know how resolve the error?



  • 2.  RE: Error install Salt-minion

    Posted Sep 11, 2024 05:00 AM

    I install Salt-Minion for Windows over Powershell after Clone Process. You have a onBoarding Script by VMware Tools 12.x. 

    $saltmaster="{prop.saltmaster}"
    $minionversion="{prop.minionversion}"
    
    & "$($env:ProgramFiles)\VMware\VMware Tools\componentMgr\saltMinion\svtminion.ps1" -i -minionversion $minionversion master=$saltmaster id=$($env:ComputerName.ToLower());
    if ($LASTEXITCODE -ne 0) { exit 1; }
    
    sleep 5
    Set-Service salt-minion -Status Stopped
    
    sleep 5
    Set-Service salt-minion -Status Running


    ------------------------------
    ----
    Das »Menschliche« an Computern ist ihre Gewissenlosigkeit
    ----
    The »human« thing about computers is their lack of conscience
    ------------------------------



  • 3.  RE: Error install Salt-minion

    Posted Oct 21, 2024 06:39 PM

    Hi. Thank you for sharing. When you use the onboarding script by VMware Tools 12.x., does salt master from SSC automatically approves its key? Do you add the saltstack resources in the assembler blueprint? 




  • 4.  RE: Error install Salt-minion

    Posted Oct 24, 2024 05:45 PM

    Hi,

    I also had issues deploying Windows Salt minions in Aria Automation 8.14 (I'm not sure which version you're using). I followed the steps (1 through 8) from this article: VMware Documentation.

    Here's the Cloud.SaltStack object configuration in the cloud template:


      Cloud_SaltStack_1:
        type: Cloud.SaltStack
        properties:
          hosts:
            - ${resource.Cloud_vSphere_Machine_1.id}
          masterId: <your-master-id>
          stateFiles:
            - /presence/init.sls
          saltEnvironment: base
       Cloud_vSphere_Machine_1:
        type: Cloud.vSphere.Machine
        properties:
            -----------------------------------------------------
          remoteAccess:
            authentication: usernamePassword
            username: <your-windows-user-name>
            password: <your-windows-user-pass>
            -----------------------------------------------------

    One IMPORTANT thing: this article VMware Aria Automation SaltStack Config Resource mentions a bug with the cloud.py script in versions 8.12, 8.13, and 8.14. Until I replaced the script with this one, the minion installations didn't work for me.

    Good luck!

    Regards.