Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: add external spread backend #1918

Merged
merged 51 commits into from
Sep 30, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
0ebb109
prevent prepare step for adhoc ubuntu-core
Sep 8, 2016
2e3c769
more changes
Sep 9, 2016
1717ec7
tasks blacklisted for the ubuntu-core-16-device system
Sep 12, 2016
9d65377
renamed device to amd64; test user
Sep 13, 2016
bf6a27e
add prepare-image.sh script
Sep 13, 2016
f7f4262
more tasks adapted to device system
Sep 13, 2016
c36777f
added ubuntu-core-16-device-amd64 system to ubuntu-core specific tasks
Sep 14, 2016
af2a6fe
added ubuntu-core-16-device-arm system
Sep 14, 2016
4730fc0
removed arm system from upgrade suite
Sep 14, 2016
1c9d3eb
added uboot test and removed arm system from grub tests
Sep 14, 2016
c96d078
fixed task summary
Sep 14, 2016
9e59ea7
excluded from arm device until we have a snap for them
Sep 14, 2016
3f69cbc
fixed find glob
Sep 14, 2016
7a350e0
for now check if grub-editenv is present before using it
Sep 14, 2016
20b0c89
reverted grub-editenv changes for arm and removed aarm system from up…
Sep 15, 2016
1ad3d3b
fuse interface test enabled on arm (test snap already uploaded)
Sep 15, 2016
62916e2
add dummy system to adhoc-ubuntu-core backend to prevent runner error…
Sep 15, 2016
ac93668
merged master
Sep 15, 2016
7a0402b
enable ubuntu-core-upgrade-core for uboot based devices
Sep 15, 2016
426af6f
snap_try_core and snap_mode checks for uboot in upgrade-core
Sep 15, 2016
e926560
enable ubuntu-core-update-rollback-stresstest for uboot based devices
Sep 15, 2016
0ef8db1
master merged and deconflicted
Sep 16, 2016
8dd3470
removed ubuntu-core system from revert-devmode-nonproduction
Sep 16, 2016
e9decf3
changes to handle pi2-kernel with pi3 gadget
Sep 16, 2016
317f5d1
build test binaries on target
Sep 19, 2016
a64280b
merged master
Sep 19, 2016
0792643
removed unneeded variants
Sep 19, 2016
de059b4
remove /home/fgimenez/workspace/gocode/src on backend restore
Sep 19, 2016
bc9a45c
read change ids from list
Sep 19, 2016
804382e
make disabled burst limit available to adhoc-ubuntu-core too
Sep 19, 2016
4afba8e
Merge branch 'master' into spread-validate-image
Sep 20, 2016
3ba99b3
review comments addressed
Sep 20, 2016
46ca6fa
prevent snapd.socket: Start request repeated too quickly. on amd64
Sep 21, 2016
2e06506
Merge branch 'master' into spread-validate-image
Sep 26, 2016
1deddf0
merged master and conflicts resolved
Sep 26, 2016
16cf045
remove unneeded restore thanks to new spread reuse capabilities
Sep 26, 2016
bdb32f1
add missing ubuntu-core system restrictions
Sep 26, 2016
570efbd
skip tests instead of split to filter by system
Sep 26, 2016
898add2
fix system check
Sep 26, 2016
919b2c1
master merged and deconflicted
Sep 27, 2016
ed17fbf
address review feedback
Sep 27, 2016
0c20edd
fixed skip check and added to prepare and restore steps too
Sep 27, 2016
c95e0c1
Merge branch 'master' into spread-validate-image
Sep 28, 2016
fffc48b
Merge branch 'master' into spread-validate-image
Sep 29, 2016
81875ed
addressed review comments
Sep 29, 2016
3966250
addressed review comments; added new ubuntu-core tests to external sy…
Sep 29, 2016
8d2b9e8
Merge branch 'spread-validate-image' of github.com:fgimenez/snappy in…
Sep 29, 2016
7984751
removed external systems from ubuntu-core-device-reg test
Sep 29, 2016
83f7696
address review comments
Sep 30, 2016
a716f4e
Merge branch 'master' into spread-validate-image
Sep 30, 2016
d87fbdc
check for env var instead of backend for skipping tests that need a c…
Sep 30, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove /home/fgimenez/workspace/gocode/src on backend restore
  • Loading branch information
Federico Gimenez committed Sep 19, 2016
commit de059b47bcaddb7899a79cdfea84f6f42ceef480
2 changes: 2 additions & 0 deletions spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ backends:
ADDRESS $SPREAD_ADHOC_UC_ADDRESS:$SPREAD_ADHOC_UC_PORT
discard: |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be dropped as it's not doing anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

echo "Discarding ad-hoc $SPREAD_SYSTEM"
restore: |
rm -rf $GOPATH/src
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? It doesn't smell quite right.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this, when i try to run the suite again on the same instance after an execution i get:

2016/09/20 10:21:19 Sending project data to external-ubuntu-core:ubuntu-core-16-device-amd64...
2016/09/20 10:21:19 Discarding external-ubuntu-core:ubuntu-core-16-device-amd64, cannot send project data: remote directory /home/gopath/src/github.com/snapcore/snapd is not empty

If I try -keep I get a password that doesn't work (even if I use the password ubuntu declared in the backend it seems to try to connect with the root user), and i can not include -reuse without password.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there's a problem indeed. When you provide reuse, spread doesn't know which machine the address belongs to. It finds that out by connecting to it and reading the data it wrote there previously. If it cannot connect, it cannot read the data, and cannot tell how to connect. Oops.

Let me think about that one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spread has been improved to support reuse properly and nicely with this case (and every other, actually). Please let me know how it goes @fgimenez.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally fine! Thanks :) I've removed that restore step.

systems:
- ubuntu-core-16.04-64:
Copy link
Contributor

@niemeyer niemeyer Sep 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the comment above about?

This system is a bit awkward, as there's no such thing as an ubuntu-core-16.04. Happy to fix Spread if that's what the comment implies. Not sure about what's broken, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we need changes in spread, currently if you have a backend with specific systems and there's one task that excludes all of them, then you get an error, for instance, if we remove the dummy system above and try to execute the suite you get:

fgimenez@arkham:~/Desktop/snappy_validate_image$ spread -v -reuse external:ubuntu-core-16-device-amd64
2016/09/27 09:57:44 Found /home/fgimenez/Desktop/snappy_validate_image/spread.yaml.
error: no systems specified for tests/main/interfaces-locale-control

The erroring task is different with each execution, probably related to the random ordering of tasks. Adding the dummy systems allow to execute the suite, tests/main/interfaces-locale-control is not executed anyway but doesn't throw any error.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks. Spread was fixed in snap and github.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, works great

username: test
Expand Down
1 change: 0 additions & 1 deletion tests/lib/adhoc-ubuntu-core/prepare-instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ execute_remote(){
ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p $INSTANCE_PORT $USER@$INSTANCE_IP "$@"
}

execute_remote "sudo rm -rf /home/gopath/src"
execute_remote "sudo adduser --extrausers --quiet --disabled-password --gecos '' test"
execute_remote "(echo test:ubuntu | sudo chpasswd)"
Copy link
Contributor

@niemeyer niemeyer Sep 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the extra subshell via (...), I believe. Same below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, the quotes are enough for managing the pipes properly, fixed

execute_remote "(echo 'test ALL=(ALL) NOPASSWD:ALL' | sudo tee /etc/sudoers.d/create-user-test)"