Code Monkey home page Code Monkey logo

Comments (4)

JamesPGriffith avatar JamesPGriffith commented on May 28, 2024

Running this on macOS is a little more graceful. Odds are, any *NIX OS will handle this better.
I am using this branch to get past #91.

user@MacBook-Pro vagrant % vagrant destroy --force ; vagrant up provisioner
[[TRANCATED]]
    provisioner: + tar -zxf osie.tar.gz
    provisioner: /tmp/tmp.yecpwZ9p0N/osie-v0-n=404,c=c35a5f8,b=master /tmp/tmp.yecpwZ9p0N /vagrant
    provisioner: + pushd osie-v0-n=404,c=c35a5f8,b=master/
    provisioner: + mv workflow-helper.sh workflow-helper-rc /vagrant/deploy/state/webroot/workflow/
    provisioner: + cp -r ./discover-metal-x86_64.tar.gz ./discover-rc ./discover.sh ./grub ./initramfs-2a2 ./initramfs-aarch64 ./initramfs-amp ./initramfs-hua ./initramfs-qcom ./initramfs-tx2 ./initramfs-x86_64 ./modloop-2a2 ./modloop-aarch64 ./modloop-amp ./modloop-hua ./modloop-qcom ./modloop-tx2 ./modloop-x86_64 ./osie-aarch64.tar.gz ./osie-installer-rc ./osie-installer.sh ./osie-runner-x86_64.tar.gz ./osie-x86_64.tar.gz ./repo-aarch64 ./repo-x86_64 ./rescue-helper-rc ./rescue-helper.sh ./runner-rc ./runner.sh ./vmlinuz-2a2 ./vmlinuz-aarch64 ./vmlinuz-amp ./vmlinuz-hua ./vmlinuz-qcom ./vmlinuz-tx2 ./vmlinuz-x86_64 /vagrant/deploy/state/webroot/misc/osie/current
    provisioner: /tmp/tmp.yecpwZ9p0N /vagrant
    provisioner: + popd
    provisioner: + generate_certificates
[[TRANCATED]]
user@MacBook-Pro vagrant % vagrant ssh provisioner                         
vagrant@provisioner:~$ find . -xtype l
vagrant@provisioner:~$ cd /vagrant
vagrant@provisioner:/vagrant$ find . -xtype l
./deploy/state/webroot/misc/osie/current/repo-aarch64
./deploy/state/webroot/misc/osie/current/repo-x86_64
vagrant@provisioner:/vagrant$

A possible paths:

  1. Create the osie tar following the symlinks.
  2. Don't untar into the host OS filesystem.

I lean toward both. I'm still exploring the application so I don't have any code to contribute at the moment.

from playground.

displague avatar displague commented on May 28, 2024

@JamesPGriffith feel free to open a PR with https://github.com/tinkerbell/sandbox/compare/master...JamesPGriffith:91-TINKERBELL_SKIP_NETWORKING-unbound-variable?expand=1

Any tarball that depends on symlinks it creates, outside of tar root is dangerous.

Running this on macOS is a little more graceful

This could be a difference between the default behaviors of GNU and BSD tar.

I would expect that the tar would be executed within the vagrant environment. While slower, this would guarantee that the paths are correct and do not pose a chance of disturbing files on the host. (guarantee -- only if a host filesystem overlay or host-nfs is not used).

from playground.

jacobweinstock avatar jacobweinstock commented on May 28, 2024

Hey @JamesPGriffith, #90 just landed and has changed the sandbox significantly. Would you mind having a look at the changes and confirm if you are still experiencing this behavior?

from playground.

JamesPGriffith avatar JamesPGriffith commented on May 28, 2024

Interestingly, I'm not even getting this far. It looks like a Vagrant issue or perhaps an issue with the box template?

james@MacBook-Pro ~ % neofetch
                    'c.          [email protected] 
                 ,xNMM.          ---------------------------------- 
               .OMMMMo           OS: macOS 11.5.2 20G95 x86_64 
               OMMM0,            Host: MacBookPro11,2 
     .;loddo:' loolloddol;.      Kernel: 20.6.0 
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 2 days, 16 hours, 36 mins 
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 99 (brew) 
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.8 
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1440x900 
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua 
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor 
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Dark) 
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: vscode 
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   CPU: Intel i7-4850HQ (8) @ 2.30GHz 
    kMMMMMMMMMMMMMMMMMMMMMMd     GPU: Intel Iris Pro 
     ;KMMMMMMMWXXWMMMMMMMk.      Memory: 10252MiB / 16384MiB 
       .cooc,.    .,coo:.
                                                         
                                                         


james@MacBook-Pro ~ % cd ~/projects
james@MacBook-Pro projects % rm -rf sandbox
james@MacBook-Pro projects % git clone https://github.com/tinkerbell/sandbox.git
Cloning into 'sandbox'...
remote: Enumerating objects: 732, done.
remote: Counting objects: 100% (414/414), done.
remote: Compressing objects: 100% (214/214), done.
remote: Total 732 (delta 213), reused 316 (delta 164), pack-reused 318
Receiving objects: 100% (732/732), 856.03 KiB | 5.42 MiB/s, done.
Resolving deltas: 100% (317/317), done.
james@MacBook-Pro sandbox % git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
james@MacBook-Pro sandbox % cd deploy/vagrant/
james@MacBook-Pro vagrant % vagrant version
Installed Version: 2.2.18
Latest Version: 2.2.18
 
You're running an up-to-date version of Vagrant!
james@MacBook-Pro vagrant % vagrant up
Bringing machine 'provisioner' up with 'virtualbox' provider...
==> provisioner: Importing base box 'generic/ubuntu2004'...
==> provisioner: Matching MAC address for NAT networking...
==> provisioner: Checking if box 'generic/ubuntu2004' version '3.4.2' is up to date...
==> provisioner: Setting the name of the VM: vagrant_provisioner_1630767993677_48783
==> provisioner: Fixed port collision for 22 => 2222. Now on port 2201.
==> provisioner: Clearing any previously set network interfaces...
==> provisioner: Preparing network interfaces based on configuration...
    provisioner: Adapter 1: nat
    provisioner: Adapter 2: hostonly
==> provisioner: Forwarding ports...
    provisioner: 22 (guest) => 2201 (host) (adapter 1)
==> provisioner: Running 'pre-boot' VM customizations...
==> provisioner: Booting VM...
==> provisioner: Waiting for machine to boot. This may take a few minutes...
    provisioner: SSH address: 127.0.0.1:2201
    provisioner: SSH username: vagrant
    provisioner: SSH auth method: private key
    provisioner: 
    provisioner: Vagrant insecure key detected. Vagrant will automatically replace
    provisioner: this with a newly generated keypair for better security.
    provisioner: 
    provisioner: Inserting generated public key within guest...
    provisioner: Removing insecure key from the guest if it's present...
    provisioner: Key inserted! Disconnecting and reconnecting using new SSH key...
==> provisioner: Machine booted and ready!
==> provisioner: Checking for guest additions in VM...
==> provisioner: Mounting shared folders...
    provisioner: /vagrant => /Users/james/projects/sandbox/deploy
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=1000,gid=1000,_netdev vagrant /vagrant

The error output from the command was:

: Invalid argument

james@MacBook-Pro vagrant %

I'm going to close this issue though as it's likely resolved or no longer relevant.

from playground.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.