cpu_flags not reporting properly when querying FreeBSD Jail
[root@isabel ~]# salt 'alpha' grains.items alpha: cpu_flags: !!python/tuple [] cpu_model: Intel(R) Xeon(R) CPU E5420 @ 2.50GHz cpuarch: amd64 domain: '' fqdn: alpha host: alpha kernel: FreeBSD kernelrelease: 9.0-RELEASE localhost: alpha mem_total: '4070' num_cpus: '4' os: FreeBSD path: /sbin:/bin:/usr/sbin:/usr/bin ps: ps auxwww pythonpath: !!python/tuple [/usr/local/bin, /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg, /usr/local/lib/python2.7/site-packages/MarkupSafe-0.15-py2.7-freebsd-9.0-RELEASE-amd64.egg, /usr/local/lib/python2.7/site-packages/Jinja2-2.6-py2.7.egg, /usr/local/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-freebsd-9.0-RELEASE-amd64.egg, /usr/local/lib/python27.zip, /usr/local/lib/python2.7, /usr/local/lib/python2.7/plat-freebsd9, /usr/local/lib/python2.7/lib-tk, /usr/local/lib/python2.7/lib-old, /usr/local/lib/python2.7/lib-dynload, /usr/local/lib/python2.7/site-packages] pythonversion: !!python/tuple [2, 7, 2, final, 0] saltpath: /usr/local/lib/python2.7/site-packages/salt virtual: physical
just noticed 'pythonpath' includes similar output.
Thats wrong alright
pythonpath is fixed, one more tuple to go!
I don't have a jail to reproduce this in, I need to sit down with you sometime and go over freeBSD jails
Whats the status here? I thought we got this one...
I hope we can close this. Here is my output:
gd@infra04:/home/gd % sudo salt 'qbstand0.*' grains.items
qbstand0.inzone:
biosreleasedate: 03/08/2009
biosversion: S5400.86B.06.00.0031.030820092249
cpu_flags: []
cpu_model: Intel(R) Xeon(R) CPU E5405 @ 2.00GHz
cpuarch: amd64
defaultencoding: null
defaultlanguage: null
domain: inzone
fqdn: qbstand0.inzone
host: qbstand0
id: qbstand0.inzone
kernel: FreeBSD
kernelrelease: 9.1-PRERELEASE
localhost: qbstand0.inzone
manufacturer: KRAFTWAY
mem_total: '65508'
nodename: qbstand0.inzone
num_cpus: 8
os: FreeBSD
os_family: FreeBSD
path: /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
productname: GEG
ps: ps auxwww
pythonpath:
- /usr/local/bin
- /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
- /usr/local/lib/python2.7/site-packages/Babel-0.9.6-py2.7.egg
- /usr/local/lib/python2.7/site-packages/MarkupSafe-0.15-py2.7-freebsd-9.1-PRERELEASE-amd64.egg
- /usr/local/lib/python2.7/site-packages/Jinja2-2.6-py2.7.egg
- /usr/local/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-freebsd-9.1-PRERELEASE-amd64.egg
- /usr/local/lib/python27.zip
- /usr/local/lib/python2.7
- /usr/local/lib/python2.7/plat-freebsd9
- /usr/local/lib/python2.7/lib-tk
- /usr/local/lib/python2.7/lib-old
- /usr/local/lib/python2.7/lib-dynload
- /usr/local/lib/python2.7/site-packages
pythonversion:
- 2
- 7
- 3
- final
- 0
saltpath: /usr/local/lib/python2.7/site-packages/salt
saltversion: 0.10.5
serialnumber: 0010665947
server_id: 1131132442
shell: /bin/sh
virtual: physical
virtual_subtype: jail
I will bump this up, how do we get the cpu flags in FreeBSD?
I have only one idea: parse /var/run/dmesg.boot Here is part of dmesg.boot about cpu:
...
FreeBSD 9.0-STABLE #1: Tue Feb 14 22:57:58 MSK 2012
[email protected]:/usr/obj/usr/src/sys/GENERIC amd64
CPU: Intel(R) Core(TM) i7 CPU M 620 @ 2.67GHz (2660.07-MHz K8-class CPU)
Origin = "GenuineIntel" Id = 0x20652 Family = 6 Model = 25 Stepping = 2
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
Features2=0x98e3fd<SSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT>
AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
AMD Features2=0x1<LAHF>
TSC: P-state invariant, performance statistics
real memory = 8589934592 (8192 MB)
avail memory = 8070905856 (7697 MB)
Event timer "LAPIC" quality 600
...