sandstorm-io / sandstorm

Sandstorm is a self-hostable web productivity suite. It's implemented as a security-hardened web app package manager.
https://sandstorm.io
Other
6.74k stars 708 forks source link

install.sh permission problem with libvirt/qemu #1974

Open techtonik opened 8 years ago

techtonik commented 8 years ago
$ vagrant-spk vm up
...
==> default:  -- Domain type:       qemu
...
==> default:  -- Command line : 
==> default: ================
==> default: Machine id: 009abfd2-1593-4ef2-9caa-d1665e77d646
==> default: Should be mounting folders
==> default:  /opt/app, opts: {:type=>:"9p", :accessmode=>"passthrough", :guestpath=>"/opt/app", :hostpath=>"/home/techtonik/p/roundup", :disabled=>false, :__vagrantfile=>true, :target=>"/opt/app", :mount=>true, :readonly=>nil, :mount_tag=>"d346bd7ee1879ac6504f3e416a0d64c"}
==> default: ================
==> default: Machine id: 009abfd2-1593-4ef2-9caa-d1665e77d646
==> default: Should be mounting folders
==> default:  /host-dot-sandstorm, opts: {:type=>:"9p", :accessmode=>"passthrough", :guestpath=>"/host-dot-sandstorm", :hostpath=>"/home/techtonik/.sandstorm", :disabled=>false, :__vagrantfile=>true, :target=>"/host-dot-sandstorm", :mount=>true, :readonly=>nil, :mount_tag=>"9d0cfb9f0076f3930337e4a038ef156"}
==> default: Creating shared folders metadata...
==> default: Starting domain.
==> default: Waiting for domain to get an IP address...
==> default: Waiting for SSH to become available...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Forwarding ports...
==> default: 6080 (guest) => 6080 (host) (adapter eth0)
==> default: Configuring and enabling network interfaces...
==> default: mounting p9 share in guest
==> default: Running provisioner: shell...
    default: Running: inline script
==> default: stdin: is not a tty
==> default: /opt/app/.sandstorm/global-setup.sh: line 14: /host-dot-sandstorm/caches/install.sh: Permission denied
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
techtonik commented 8 years ago

Some kind of permission problem, but I have no idea

sandstorm

techtonik commented 8 years ago

Looks like a pointer - https://github.com/vagrant-libvirt/vagrant-libvirt/issues/274

techtonik commented 8 years ago

Failing line 14 in global-setup.sh is this:

curl $CURL_OPTS https://install.sandstorm.io/ 2>&1 > /host-dot-sandstorm/caches/install.sh | cat

It tries to download a file into /host-dot-sandstorm dir. This dir is a share endpoint created by libvirt in passthrough mode as shown in:

/host-dot-sandstorm, opts: {
    :type=>:"9p",
    :accessmode=>"passthrough",
    :guestpath=>"/host-dot-sandstorm",
    :hostpath=>"/home/techtonik/.sandstorm",
    :target=>"/host-dot-sandstorm",
    ...
}

The problem is here - for some reason files can be read in passthrough mode, but not written. Need to find error log to dig further.

Chrislevi commented 7 years ago

Any progress with this issue? would be really helpful if fixed. Thanks.