question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No way for update arguments via IMAGES_HOOK anymore

See original GitHub issue

Description Since 5.6 we have nice locking mechanism. But all new images created with LOCKING enabled. So if you have some hook which adds some custom parameters to creating images, it will not work anymore.

IMAGE_HOOK supports only CREATE and DELETE operations, no way to call it after image is READY

To Reproduce

  • Write hook for adding specific label to the image:
#!/bin/sh
EDITOR="echo LABELS=mylabel >" oneimage update --append $1
  • Install hook in oned.conf:
IMAGE_HOOK = [
    name      = "add_label",
    on        = "CREATE",
    command   = "add_label.sh",
    arguments = "$ID" ]
  • Upload new image, alpine for example:
http://dl-cdn.alpinelinux.org/alpine/v3.8/releases/x86_64/alpine-standard-3.8.1-x86_64.iso
  • In logs you will see error
[Z0][ImM][I]: Copying http://dl-cdn.alpinelinux.org/alpine/v3.8/releases/x86_64/alpine-standard-3.8.1-x86_64.iso to repository for image 1440
[Z0][ReM][E]: Req:6704 UID:0 one.image.update result FAILURE [one.image.update] User [0] : IMAGE is locked. [1440].

Expected behavior Attached label to the image

Details

  • Affected Component: Core
  • Hypervisor: KVM
  • Version: 5.6.0

Progress Status

  • Branch created
  • Code committed to development branch
  • Testing - QA
  • Documentation
  • Release notes - resolved issues, compatibility, known issues
  • Code committed to upstream release/hotfix branches
  • Documentation committed to upstream release/hotfix branches

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
kvapscommented, Nov 22, 2018

For now I use:

oneimage unlock "$1"

as workaround, in my hook it is working fine

1reaction
atodorov-storpoolcommented, Nov 22, 2018

Same problem when importing an image issue #2292

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using function arguments in update.formula - Stack Overflow
I'd prefer to do this using update.formula() , but of course update.formula(controls, x ~ .) and update.formula(controls, as.name(x) ~ .) don't ...
Read more >
Petition · End Forced Pelvic Exams in Connecticut · Change.org
Please note that this petition contains clarifications to the original text. Imagine needing surgery. You would worry about a lot of things.
Read more >
Creating Public Texts - EdTech Books
sarcastic, but your audience may not read it that way. It's much ... position's best argument, which is then knocked down by the...
Read more >
Upgrade Guide from v1 to v2 — Chainer 7.8.1 documentation
This train/test argument has been removed in Chainer v2. If your code is using the train or test argument, you have to update...
Read more >
An history of apparitions, oracles, prophecies, and predictions ...
The event did give credit to the Oracle; for the Gardi being ta∣ken by Cyrus, ... and those that were sent enquiring for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found