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

OS Deployment not working as expected #80

Closed
ghost opened this issue Apr 27, 2021 · 4 comments
Closed

OS Deployment not working as expected #80

ghost opened this issue Apr 27, 2021 · 4 comments
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@ghost
Copy link

ghost commented Apr 27, 2021

Expected Behaviour

I'm not sure if I'm putting this ticket in the right spot.

I am trying to test Tinkerbell to see if we might want to switch to it as a deployment method for our physical hosts. I am trying to deploy Debian as per your instructions here, specifically streaming the image to disk. I'm not sure I'm following them correctly and I just want to know if I'm on the right track. Any help would be very much appreciated.

I've also tried CentOS and Ubuntu with the same results

PREFACE -- The hello-world container deploys for me

I add the following hardware, template, and workflow. When the VM with the mac of 52:54:00:de:af:57 comes up it boots and alpine linux is running, debian is not installed and I see no errors in the logs and I have not caught any errors in the boot sequence either. I assume I am doing something pretty dumb, but I can't seem to figure it out.

cat > hardware-data.json <<EOF
{
  "id": "ce3e62ed-826f-4485-a39f-a82bb74338e2",
  "metadata": {
    "facility": {
      "facility_code": "onprem"
    },
    "instance": {},
    "state": ""
  },
  "network": {
    "interfaces": [
      {
        "dhcp": {
          "arch": "x86_64",
          "ip": {
            "address": "192.168.100.202",
            "gateway": "192.168.100.1",
            "netmask": "255.255.255.0"
          },
          "mac": "52:54:00:de:af:57",
          "uefi": false
        },
        "netboot": {
          "allow_pxe": true,
          "allow_workflow": true
        }
      }
    ]
  }
}
EOF

docker exec -i deploy_tink-cli_1 tink hardware push < ./hardware-data.json


cat > debian.yml  <<EOF
version: "0.1"
name: debian_Focal
global_timeout: 1800
tasks:
  - name: "os-installation"
    worker: "{{.device_1}}"
    volumes:
      - /dev:/dev
      - /dev/console:/dev/console
      - /lib/firmware:/lib/firmware:ro
    actions:
      - name: "stream debian image"
        image: quay.io/tinkerbell-actions/image2disk:v1.0.0
        timeout: 90
        environment:
            IMG_URL: 192.168.100.201:8080/debian-10-openstack-amd64.raw
            DEST_DISK: /dev/sda
            COMPRESSED: false
      - name: "kexec debian"
        image: quay.io/tinkerbell-actions/kexec:v1.0.0
        timeout: 90
        pid: host
        environment:
            BLOCK_DEVICE: /dev/sda1
            FS_TYPE: ext4          
EOF

docker exec -i deploy_tink-cli_1 tink template create \
  < ./debian.yml


docker exec -i deploy_tink-cli_1 tink workflow create \
    -t 44e51a28-a6cc-11eb-b575-0242ac120005 \
    -r '{"device_1":"52:54:00:de:af:57"}'

Additionally, if I log into the alpine container and execute the following:

docker run -e DEST_DISK=/dev/sda -e IMG_URL=192.168.100.201:8080/debian-10-openstack-amd64.raw -e COMPRESSED=false quay.io/tinkerbell-actions/image2disk:v1.0.0

I get an error that says `msg="write /dev/sda: no space left on device"

Context

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS):

  • How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:

I assume I'm just doing something wrong

@jimmyat
Copy link

jimmyat commented May 4, 2021

I had a similar issue here which turned out to be kexec not working properly: I'm getting function not implemented error. I'm not sure why this is just yet. The OS was actually deployed (and if I reboot i can get into the system just fine) but kexec didn't run.

If you SSH into the worker and check docker logs tink-worker what do you see? Do your actions succeed in the workflow log?

@tstromberg tstromberg added the kind/support Categorizes issue or PR as a support question. label Aug 27, 2021
@tstromberg
Copy link
Contributor

any thoughts, @mmlb or @jacobweinstock ?

@jacobweinstock
Copy link
Member

Hey @jkl92, I know it's been a while here, but would you be able to post the output of fdisk -l on the worker?

@ghost
Copy link
Author

ghost commented Sep 3, 2021

Sorry, I got this working a while back, just had to learn a little about tinkerbell fist. thanks.

@ghost ghost closed this as completed Sep 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

3 participants