lp:~zyga/snapcraft/fix-1486659

Created by Zygmunt Krynicki and last modified
Get this branch:
bzr branch lp:~zyga/snapcraft/fix-1486659
Only Zygmunt Krynicki can upload to this branch. If you are Zygmunt Krynicki please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Zygmunt Krynicki
Project:
Snapcraft
Status:
Merged

Recent revisions

146. By Zygmunt Krynicki

Detect that there are no snaps to copy before booting the VM

This patch optimizes the flow of snapcraft run so that when there are no
snaps to copy we don't even try to boot the VM. This way the user will
see a helpful error message much earlier than before.

Signed-off-by: Zygmunt Krynicki <email address hidden>

145. By Zygmunt Krynicki

Don't crash if there are no snaps to copy

This patch changes snapcraft run to provide a useful error message when
there are no snaps to copy into the test VM.

Signed-off-by: Zygmunt Krynicki <email address hidden>

144. By Zygmunt Krynicki

Correctly find the latest snap to copy into the test VM

This patch fixes two issues, first of all, snapcraft run tried to find
*.snaps in the snaps/ directory, which as far as I can see not used for
that purpose at all. This is changed so that the current working
directory is searched.

The second fix involves copying just the most recent snap into the
image. Copying all snaps triggers another bug where snappy install
*.snap will treat the second snap as a configuration file and print a
rather confusing error message.

Signed-off-by: Zygmunt Krynicki <email address hidden>

143. By Zygmunt Krynicki

Be strict about ssh/scp failures in snapcraft run

This patch ensures that each ssh and scp failure, that we have no way of
recovering from, is fatal. This is done by using _check_call instead of
_call(). The exception is not caught yet but the new behavior is far
more useful than a silent failure.

Signed-off-by: Zygmunt Krynicki <email address hidden>

142. By Zygmunt Krynicki

Don't try to login interactively to snapcraft run vms

This patch fixes a potential error case where snapcraft run misbehaves
and each of the invoked ssh or scp commands is blocked by interactive
ssh authentication (password prompt) that is typically totally hidden in
the large amount of output produced by the booting machine.

To prevent this from happening the KbdInteractiveAuthentication ssh
option is set to "no".

Signed-off-by: Zygmunt Krynicki <email address hidden>

141. By Zygmunt Krynicki

Add rationale for ssh options used by snapcraft run

This patch briefly explains why existing ssh options are needed.

Signed-off-by: Zygmunt Krynicki <email address hidden>

140. By Zygmunt Krynicki

Log essential snapcraft run shell commands

This patch replaces a handful of subprocess.call() calls with two
wrappers, _call() and _check_call(), that implement the same logic with
an extra logging so that debugging is easier.

Signed-off-by: Zygmunt Krynicki <email address hidden>

139. By Zygmunt Krynicki

Use the same ssh key as ubuntu-device-flash does

This patch makes snapcraft locate the same ssh key that a corresponding
bit of code in ubuntu-device-flash is looking for, so that the
subsequent ssh and scp commands can use that key (identity) explicitly.

This fixes an issue where the user has multiple keys and due the
mismatch between the two programs, snapcraft run cannot copy or install
the package inside the started virtual machine.

Fixes: https://bugs.launchpad.net/snapcraft/+bug/1486659
Signed-off-by: Zygmunt Krynicki <email address hidden>

138. By Zygmunt Krynicki

Add find_latest_private_key

This patch adds a helper function that can locate the most recently
modified private ssh key. It is needed by the subsequent patch which
addresses issues that can prevent logging into a test virtual machine in
certain ssh configurations.

Signed-off-by: Zygmunt Krynicki <email address hidden>

137. By Zygmunt Krynicki

Correct all the logging calls to pass arguments directly by zyga approved by mvo

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:~snappy-dev/snapcraft/core
This branch contains Public information 
Everyone can see this information.

Subscribers