Skip to content

Commit

Permalink
tests: Add workaround
Browse files Browse the repository at this point in the history
Temp workaround for #15

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
  • Loading branch information
mudler committed Feb 14, 2022
1 parent 762e644 commit d035c47
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
3 changes: 3 additions & 0 deletions framework/files/system/oem/01_ros-rootfs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ stages:
/var/lib/cni
PERSISTENT_STATE_BIND: "true"
rootfs.before:
# Try to get network before trying to fetch datasource from the net
- commands:
- wicked ifup eth0
- &datasource
name: "Pull data from provider"
datasource:
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export CLOUD_INIT_ISO?=$(ROOT_DIR)/build/ci.iso
clean: clean_vm_from_iso
(vagrant destroy -f) 2> /dev/null || true
(vagrant box remove $(BOX_IMAGE)) 2> /dev/null || true
rm -rf build-box || true
rm -rf build-box build || true

add:
vagrant box add --force $(BOX_IMAGE) $(BOX)
Expand Down
3 changes: 2 additions & 1 deletion tests/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

Vagrant.configure("2") do |config|
config.vm.guest = :linux
config.ssh.username = "vagrant"
# Temp workaround for https://github.com/rancher-sandbox/os2/issues/15
config.ssh.username = "root"
config.vm.boot_timeout = 460
config.ssh.connect_timeout = 360
config.vm.synced_folder ".", "/vagrant", disabled: true
Expand Down
22 changes: 16 additions & 6 deletions tests/assets/cloud_init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ users:
passwd: "ros"
ssh_authorized_keys:
- https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub
- name: "vagrant"
passwd: "vagrant"
shell: "/bin/bash"
homedir: "/run/vagrant"
ssh_authorized_keys:
- https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub
# - name: "vagrant"
# passwd: "vagrant"
# shell: "/bin/bash"
# homedir: "/run/vagrant"
# ssh_authorized_keys:
# - https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub

# Temp workaround for https://github.com/rancher-sandbox/os2/issues/15.
# Uncomment the lines commented before and drop runcmd when it is closed.
runcmd:
- systemctl start wicked
#- useradd -d /run/vagrant -U -s /bin/bash -m vagrant
- mkdir /root/.ssh
- curl -L https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub -o /root/.ssh/authorized_keys
- chmod 700 /root/.ssh
- chmod 600 /root/.ssh/authorized_keys

0 comments on commit d035c47

Please sign in to comment.