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

grains.virtual show incorrect info #50266

Closed
4815162342lost opened this issue Oct 28, 2018 · 9 comments

Comments

Projects
None yet
2 participants
@4815162342lost
Copy link

commented Oct 28, 2018

Hello,

I have a physical Oracle Linux-server.

But salt show that it is virtual server.

[me@salt-master ~]$ sudo salt 'minion' grains.get virtual
minion:
    xen

Minion-version:

[root@salt-minion: ~]# salt-minion --version
salt-minion 2018.3.2 (Oxygen)

Master version:

[me@salt-master ~]$ salt-master --version
salt-master 2018.3.0 (Oxygen)

It is physical server, not virtual...

[root@salt-minion: ~]# virt-what

[root@salt-minion: ~]# dmidecode -t system
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

Handle 0x000B, DMI type 1, 27 bytes
System Information
        Manufacturer: HP
        Product Name: ProLiant BL660c Gen9
        Version: Not Specified
        Wake-up Type: Power Switch
        Family: ProLiant

[root@salt-minion: ~]# cat /etc/oracle-release
Oracle Linux Server release 7.3

I can provide the output of any command if needed.

Could you please take a look if possible?

Have a nice week!

@garethgreenaway

This comment has been minimized.

Copy link
Member

commented Oct 29, 2018

@4815162342lost Thanks for the report. A couple things to check, can you see if any of the following directories exist on the system in question, /proc/sys/xen, /sys/bus/xen or /proc/xen. Can you also check if you have a grain called virtual_subtype. Thanks!

@4815162342lost

This comment has been minimized.

Copy link
Author

commented Oct 29, 2018

Hello @garethgreenaway,

Thanks for your worries.

Please, see:

[root@salt-minion: ~]# ll /proc/sys/xen
ls: cannot access /proc/sys/xen: No such file or directory
[root@salt-minion: ~]# ll /sys/bus/xen
total 0
drwxr-xr-x 2 root root    0 Oct 29 18:52 devices
drwxr-xr-x 3 root root    0 Sep 17 07:00 drivers
-rw-r--r-- 1 root root 4096 Oct 29 18:52 drivers_autoprobe
--w------- 1 root root 4096 Oct 29 18:52 drivers_probe
--w------- 1 root root 4096 Oct 29 18:52 uevent
[root@salt-minion: ~]# ll /proc/xen
ls: cannot access /proc/xen: No such file or directory


[me@salt-master ~]$ sudo salt minion grains.get virtual_subtype
minion:
    Xen PV DomU

Let me know if you need any information. I am always ready to provide it.

@garethgreenaway

This comment has been minimized.

Copy link
Member

commented Oct 29, 2018

@4815162342lost Thanks for the information. This is likely the reason that the machine is being flagged as a Xen system, the three directories that I mentioned will only show up on a Xen system. Is it possible that Oracle Linux is running everything inside Xen in some manner? Unfortunately I don't know too much about it and don't currently have access to a system running it.

@4815162342lost

This comment has been minimized.

Copy link
Author

commented Oct 29, 2018

Hello @garethgreenaway,

Not sure that root cause is related to /sys/bus/xen

I checked other virtual VmWare server which determine correct and /sys/bus/xen path also exist:

[root@second_minion ~]# ll /sys/bus/xen
total 0
drwxr-xr-x 2 root root    0 Oct  4 11:04 devices
drwxr-xr-x 2 root root    0 Oct  4 07:00 drivers
-rw-r--r-- 1 root root 4096 Oct  4 11:04 drivers_autoprobe
--w------- 1 root root 4096 Oct  4 11:04 drivers_probe
--w------- 1 root root 4096 Oct  4 11:04 uevent

[me@salt-master ~]$ sudo salt second_minion grains.get virtual
second_minion:
    VMware

Centos 7.5

On my home PC with Ubuntu 18.10 /sys/bus/xen aslo exists.

@garethgreenaway

This comment has been minimized.

Copy link
Member

commented Oct 29, 2018

@4815162342lost Thanks for that additional information. This does appear to be a bug. We'll get it fixed asap.

@garethgreenaway

This comment has been minimized.

Copy link
Member

commented Oct 29, 2018

@4815162342lost One other question. On the physical Oracle Linux system can you see if the command systemd-detect-virt exists and if so, can you run it and provide the output? Thanks!

@4815162342lost

This comment has been minimized.

Copy link
Author

commented Oct 30, 2018

@garethgreenaway sure!

[root@salt-minion: ~]# systemd-detect-virt
none

@garethgreenaway

This comment has been minimized.

Copy link
Member

commented Nov 15, 2018

@4815162342lost Apologies for the delay on this one. If you're able to, verification that the change in the above PR fixes the issue would be appreciated.

@4815162342lost

This comment has been minimized.

Copy link
Author

commented Nov 16, 2018

It is working!

Thanks you so much! Have a nice Friday!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.