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

Document the image2disk action support for the Zstandard decompression and rename the extension to zst #65

Open
rgl opened this issue Sep 21, 2021 · 3 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@rgl
Copy link

rgl commented Sep 21, 2021

Document the support for the Zstandard decompression and rename the extension from .zs to .zst in https://github.com/tinkerbell/hub/search?q=zstd.

@tstromberg tstromberg added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Sep 21, 2021
@tstromberg
Copy link

tstromberg commented Sep 21, 2021

This sounds like a perfect good first issue. Feel free to send over a PR and I'll review it!

@rgl
Copy link
Author

rgl commented Sep 21, 2021

while trying to implement this with the workflow:

root@provisioner:~# tink workflow get 2ae17713-1b09-11ec-9f98-0242ac120002 --format json | jq -r .data[].data
version: "0.1"
name: esxi
global_timeout: 1800
tasks:
  - name: esxi-install
    worker: '08:00:27:00:00:02'
    volumes:
      - /dev:/dev
      - /sys/firmware/efi/efivars:/sys/firmware/efi/efivars
      - /worker:/worker
    actions:
      - name: reset-uefi-boot
        image: reset-uefi-boot
      - name: install
        image: image2disk:v1.0.0
        environment:
          IMG_URL: 'http://10.3.0.2:8080/images/esxi-amd64.raw.zs'
          COMPRESSED: true
          DEST_DISK: '/dev/sda'
      - name: reboot
        image: reboot

image2disk:v1.0.0 seems to crash (please note that the image at http://10.3.0.2:8080/images/esxi-amd64.raw.zs really exists):

IMAGE2DISK - Cloud image streamer
INFO[0000] Beginning write of image [esxi-amd64.raw.zs] to disk [/dev/sda]
FATA[0000] nil input provided as reader

by looking at the code at https://github.com/tinkerbell/hub/blob/9dbfd747f8754314e03441bd91aa8093dcc851f4/actions/image2disk/v1/pkg/image/image.go#L148-L155 I'm a bit confused by the defer Close(). isn't this findDecompressor function returning a closed stream? shouldn't the caller be the one calling Close?

I might also be looking at the wrong source code, as there is no v1.0.0 tag in this repository.

@nshalman nshalman changed the title Document the support for the Zstandard decompression and rename the extension to zst Document the image2disk action support for the Zstandard decompression and rename the extension to zst Oct 5, 2021
@nshalman
Copy link
Member

nshalman commented Oct 5, 2021

I might also be looking at the wrong source code, as there is no v1.0.0 tag in this repository.

If you're planning on trying to implement the fix, my suggestion would be to work with the latest code in the repo, build the image locally, push it to your image repository for testing, and then we can bump the image version when we have the fix.

Do you need additional help figuring out how to do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

3 participants