salt icon indicating copy to clipboard operation
salt copied to clipboard

cpu_flags not reporting properly when querying FreeBSD Jail

Open cedwards opened this issue 14 years ago • 8 comments

[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

cedwards avatar Jan 26 '12 01:01 cedwards

just noticed 'pythonpath' includes similar output.

cedwards avatar Jan 26 '12 01:01 cedwards

Thats wrong alright

thatch45 avatar Jan 26 '12 04:01 thatch45

pythonpath is fixed, one more tuple to go!

thatch45 avatar Feb 03 '12 07:02 thatch45

I don't have a jail to reproduce this in, I need to sit down with you sometime and go over freeBSD jails

thatch45 avatar Feb 07 '12 01:02 thatch45

Whats the status here? I thought we got this one...

thatch45 avatar Oct 24 '12 04:10 thatch45

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

giantlock avatar Nov 17 '12 20:11 giantlock

I will bump this up, how do we get the cpu flags in FreeBSD?

thatch45 avatar Nov 18 '12 17:11 thatch45

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
...

giantlock avatar Nov 18 '12 18:11 giantlock