Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
smartos.image_present fails with "does not exist" #51503
one for @sjorge
Description of Issue/Question
Running a state that includes the function
partial output of
Output of running state
Steps to Reproduce Issue
Create the sls and run
(Provided by running
Can you run with -l debug to see if it is trying to run imgadm import or not even trying? ~ sjorge…
On 5 Feb 2019, at 16:03, Gareth Howell ***@***.***> wrote: one for @sjorge Description of Issue/Question Running a state that includes the function smartos.image_present fails even though imgadm list shows the named image as available. Setup Start of kvm_docker1.sls ac99517a-72ac-44c0-90e6-c7ce3d944a0a: smartos.image_present docker1.agdon.net: smartos.vm_present: - vmconfig: image_uuid: ac99517a-72ac-44c0-90e6-c7ce3d944a0a brand: kvm alias: docker1 ... partial output of imgadm list on global zone imgadm avail -o uuid,name,version,os,type,published | grep zvol ... 6b47e1d9-36b8-4b6f-8764-5ff5fe6d120b ubuntu-certified-16.04 20181005 linux zvol 2018-10-11T12:43:25Z ac99517a-72ac-44c0-90e6-c7ce3d944a0a ubuntu-certified-18.04 20180808 linux zvol 2018-10-11T12:45:24Z d6e56c0e-1e51-11e9-8ff1-2fecf38a5566 centos-7 20190122 linux zvol 2019-01-22T14:27:25Z Output of running state sudo salt global_deneb state.apply kvm_docker1 global_deneb: ---------- ID: ac99517a-72ac-44c0-90e6-c7ce3d944a0a Function: smartos.image_present Result: False Comment: image ac99517a-72ac-44c0-90e6-c7ce3d944a0a does not exists Started: 14:55:24.895018 Duration: 4160.295 ms Changes: ---------- ID: docker1.agdon.net Function: smartos.vm_present Result: False Comment: image ac99517a-72ac-44c0-90e6-c7ce3d944a0a not installed Started: 14:55:29.055885 Duration: 1488.961 ms Changes: Summary for global_deneb ------------ Succeeded: 0 Failed: 2 ------------ Total states run: 2 Total run time: 5.649 s ERROR: Minions returned with non-zero exit code Steps to Reproduce Issue Create the sls and run Versions Report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) Master Salt Version: Salt: 2019.2.0-556-g8af9765 Dependency Versions: cffi: 1.5.2 cherrypy: Not Installed dateutil: Not Installed docker-py: Not Installed gitdb: 2.0.2 gitpython: 2.1.5 Jinja2: 2.8 libgit2: 0.24.0 M2Crypto: 0.21.1 Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.4.6 mysql-python: Not Installed pycparser: 2.14 pycrypto: 2.6.1 pycryptodome: Not Installed pygit2: 0.24.0 Python: 2.7.12 (default, Nov 12 2018, 14:36:49) python-gnupg: Not Installed PyYAML: 3.11 PyZMQ: 15.2.0 smmap: 2.0.3 timelib: Not Installed Tornado: 4.2.1 ZMQ: 4.1.4 System Versions: dist: Ubuntu 16.04 xenial locale: UTF-8 machine: x86_64 release: 4.3.0 system: Linux version: Ubuntu 16.04 xenial Minion Salt Version: Salt: 2019.2.0-544-gb76b281 Dependency Versions: cffi: 1.11.5 cherrypy: Not Installed dateutil: Not Installed docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 2.10 libgit2: Not Installed M2Crypto: Not Installed Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.5.6 mysql-python: Not Installed pycparser: 2.19 pycrypto: 2.6.1 pycryptodome: Not Installed pygit2: Not Installed Python: 2.7.15 (default, Jan 28 2019, 05:17:09) python-gnupg: Not Installed PyYAML: 3.13 PyZMQ: 17.1.2 smmap: Not Installed timelib: Not Installed Tornado: 5.1.1 ZMQ: 4.2.5 System Versions: dist: locale: UTF-8 machine: i86pc release: 5.11 system: SunOS version: Not Installed — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Some quick testing...
Initial run is OK
Follow up run OK.
It’s possible, but I don’t think this is an invalid image. After posting, I did some investigation.
I imported the image manually, but the state still failed. I then commented out the clause with the test in it and the subsequent state passed. However, as posted, the state was wrong. The reference to the image should have been in the disks section, not the main vmconfig.
The only thing that is different about that image is that it is a zvol and does not mount on /zones after it is imported.
With the patch from #51383 this state works fine for me:
I did not look ath the smartos.vm_present yet, because if the smartos.image_present fails there is no point in looking at that one yet (similar code paths)
First run it imports the image (this takes up to 15 minutes), runs after that are happy. So if you can confirm you see the same with the patch applied. That would be great, if not we can start trying to figure out why it is still failing for you.
After adding the vm, that works Ok fro me too.
OK, thanks. It’s the same minion, so it should have that patch already, as I put it in there last week. I’ll check. Gareth…
On 6 February 2019 at 09:24:12, Jorge Schrauwen ***@***.***) wrote: With the patch from #51383 <#51383> this state works fine for me: ac99517a-72ac-44c0-90e6-c7ce3d944a0a: smartos.image_present I did not look ath the smartos.vm_present yet, because if the smartos.image_present fails there is no point in looking at that one yet (similar code paths) First run it imports the image (this takes like 15 minutes), runs after that are happy. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#51503 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAkFNpHbC96n97A4S0fg73PDO83geBIgks5vKp88gaJpZM4ajZYW> .