hashicorp / packer-plugin-salt

This Packer provisioner has been archived due to it no longer being maintained. Users are encouraged to use the shell or shell-local provisioner to run the provisioning tools made available by this plugin. If interested in maintaining this plugin please reach out to us at packer@hashicorp.com.
https://www.packer.io/docs/provisioners/salt-masterless
Mozilla Public License 2.0
2 stars 5 forks source link

[SALT] provision after change in issue #7833 breaks #23

Open hc-github-team-packer opened 3 years ago

hc-github-team-packer commented 3 years ago

This issue was originally opened by @dsaard in https://github.com/hashicorp/packer/issues/8244 and has been migrated to this repository. The original issue description is below.


Overview of the Issue

After the change in issue #7833 i could not upload the state tree

Build 'virtualbox-iso' errored: Error uploading local state tree to remote: Process exited with status 1 1.4.2 works as expected at GNU/Linux hosts

at macos with 1.4.2 1.4.3 and 1.4.3

Build 'virtualbox-iso' errored: Error uploading local state tree to remote: lstat /media: no such file or directory 😳

This error occurred with builder

virtualbox-iso vagrant with virtualbox vagrant with parallels

Reproduction Steps

create centos7.json with salt-masterless provisioner

{
    "provisioners": [
        {
            "type": "salt-masterless",
            "local_state_tree": "/Users/dsaard/source/git/infra/salt/states",
            "local_pillar_roots": "/Users/dsaars/source/git/infra/salt/pillar",
            "skip_bootstrap": false,
            "log_level": "debug",
            "minion_config": "config/minion"
        }
    ],
    "builders": [
        {
            "communicator": "ssh",
            "type": "vagrant",
            "source_path": "generic/centos7",
            "skip_add": true,
            "provider": "virtualbox"
        }
    ]
}

Packer version

1.4.3 1.4.4

Operating system and Environment details

Debian 10 MacOs 10.15

Log Fragments and crash.log files

    vagrant: Uploading local state tree: /Users/dsaar/source/git/infra/salt/states
2019/10/18 10:24:14 packer: 2019/10/18 10:24:14 [DEBUG] Upload dir '/Users/dsaar/source/mgr/git/infra/salt/states' to 'states'
2019/10/18 10:24:14 packer: 2019/10/18 10:24:14 [DEBUG] Opening new ssh session
2019/10/18 10:24:14 packer: 2019/10/18 10:24:14 [DEBUG] Starting remote scp process:  scp -rvt states
2019/10/18 10:24:14 packer: 2019/10/18 10:24:14 [DEBUG] Started SCP session, beginning transfers...
2019/10/18 10:24:14 packer: 2019/10/18 10:24:14 [DEBUG] No trailing slash, creating the source directory name
2019/10/18 10:24:14 packer: 2019/10/18 10:24:14 [DEBUG] SCP: starting directory upload: states
2019/10/18 10:24:14 [INFO] (telemetry) ending salt-masterless
==> vagrant: Provisioning step had errors: Running the cleanup provisioner, if present...
==> vagrant: destroying Vagrant box...
2019/10/18 10:24:14 packer: 2019/10/18 10:24:14 Calling Vagrant CLI: []string{"destroy", "-f", "source"}
2019/10/18 10:24:21 packer: 2019/10/18 10:24:21 [vagrant driver] stdout: ==> source: Forcing shutdown of VM...
2019/10/18 10:24:21 packer: ==> source: Destroying VM and associated drives...
2019/10/18 10:24:21 packer: 2019/10/18 10:24:21 [vagrant driver] stderr:
==> vagrant: Deleting output directory...
2019/10/18 10:24:21 [INFO] (telemetry) ending vagrant
Build 'vagrant' errored: Error uploading local state tree to remote: lstat /media: no such file or directory

2019/10/18 10:24:21 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2019/10/18 10:24:21 machine readable: vagrant,error []string{"Error uploading local state tree to remote: lstat /media: no such file or directory"}
==> Some builds didn't complete successfully and had errors:
==> Builds finished but no artifacts were created.
--> vagrant: Error uploading local state tree to remote: lstat /media: no such file or directory
nywilken commented 3 years ago

With the archival of this repository all open issues will be marked as read-only. If you wish to further discuss this plugin or any of its open issues we invite you to open a discussion on the Packer community forum.

More details on the plugin archiving process for this provisioner can be found on the Plans to Archive Unmaintained Packer Provisioner Plugins blog post.