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

Missing facts on Solaris 11.3 (x86) with Ansible 2.4 #31049

Closed
passw0rd123 opened this Issue Sep 28, 2017 · 11 comments

Comments

Projects
None yet
7 participants
@passw0rd123

passw0rd123 commented Sep 28, 2017

ISSUE TYPE
  • Bug Report
COMPONENT NAME

setup / gather_facts

ANSIBLE VERSION
ansible 2.4.0.0
  config file = /Users/username/git/mailsysteme/ansible.cfg
  configured module search path = [u'/Users/username/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/2.4.0.0/libexec/lib/python2.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
CONFIGURATION
ANSIBLE_SSH_ARGS(/Users/username/git/project/ansible.cfg) = -C -o ControlMaster=auto -o ControlPersist=60s
ANSIBLE_SSH_PIPELINING(/Users/username/git/project/ansible.cfg) = False
DEFAULT_FORKS(/Users/username/git/project/ansible.cfg) = 10
DEFAULT_HOST_LIST(/Users/username/git/project/ansible.cfg) = [u'/Users/username/git/project/staging.ini']
DEFAULT_TIMEOUT(/Users/username/git/project/ansible.cfg) = 60
DEFAULT_UNDEFINED_VAR_BEHAVIOR(/Users/username/git/project/ansible.cfg) = True
DEPRECATION_WARNINGS(/Users/username/git/project/ansible.cfg) = True
RETRY_FILES_ENABLED(/Users/username/git/project/ansible.cfg) = False
OS / ENVIRONMENT
  • macOS Sierra 10.12.6
SUMMARY

Since Ansible 2.4.0.0 the setup module drops many facts on Solaris 11.3 (x86) systems which were available in Ansible 2.3. CentOS 7.4 seems not to be affected by this issue.

In a quick diff the following facts are missing:

  • ansible_devices
  • ansible_memtotal_mb
  • ansible_mounts
  • ansible_processor
  • ansible_processor_cores
  • ansible_processor_count
  • ansible_swap_allocated_mb
  • ansible_swap_reserved_mb
  • ansible_swapfree_mb
  • ansible_swaptotal_mb
  • ansible_uptime_seconds

In my case it was ansible_mounts which broke my plays...

STEPS TO REPRODUCE
ansible all -i inventory.ini -m setup
EXPECTED RESULTS
ACTUAL RESULTS

@alikins

This comment has been minimized.

Show comment
Hide comment
@alikins

alikins Sep 28, 2017

Contributor

@passw0rd123 Could you post the output from the ansible -m setup for 2.3 and 2.4?

Contributor

alikins commented Sep 28, 2017

@passw0rd123 Could you post the output from the ansible -m setup for 2.3 and 2.4?

@alikins

This comment has been minimized.

Show comment
Hide comment
@alikins

alikins Sep 28, 2017

Contributor

@passw0rd123 also, the output of:

python -c 'import platform; print(platform.system())'
Contributor

alikins commented Sep 28, 2017

@passw0rd123 also, the output of:

python -c 'import platform; print(platform.system())'

@alikins alikins added the needs_info label Sep 28, 2017

@passw0rd123

This comment has been minimized.

Show comment
Hide comment
@passw0rd123

passw0rd123 Oct 16, 2017

 $ python -c 'import platform; print(platform.system())'
SunOS

passw0rd123 commented Oct 16, 2017

 $ python -c 'import platform; print(platform.system())'
SunOS

@ansibot ansibot removed the needs_info label Oct 16, 2017

@passw0rd123

This comment has been minimized.

Show comment
Hide comment
@passw0rd123

passw0rd123 Oct 16, 2017

It seems that older Solaris patchlevels are not affected.

The Solaris evaluation vm from oracle.com has a patchlevel from mid 2015 and can not be upgraded...

0.175.3.1.0.3.0

While 2017 patchlevel lacks some facts if you use Ansible 2.4.0.0

0.175.3.22.0.3.0

I'll try to post some setup outputs if I find the time to sanitize them...

passw0rd123 commented Oct 16, 2017

It seems that older Solaris patchlevels are not affected.

The Solaris evaluation vm from oracle.com has a patchlevel from mid 2015 and can not be upgraded...

0.175.3.1.0.3.0

While 2017 patchlevel lacks some facts if you use Ansible 2.4.0.0

0.175.3.22.0.3.0

I'll try to post some setup outputs if I find the time to sanitize them...

@alikins

This comment has been minimized.

Show comment
Hide comment
@alikins

alikins Oct 16, 2017

Contributor
Contributor

alikins commented Oct 16, 2017

@passw0rd123

This comment has been minimized.

Show comment
Hide comment
@passw0rd123

passw0rd123 Oct 17, 2017

If possible, could you include output from some of the commands hardware.py runs to collect sunos facts?

Sure

memory

/usr/sbin/prtconf

System Configuration:  Oracle Corporation  i86pc
Memory size: 524279 Megabytes
System Peripherals (Software Nodes):

prtconf: devinfo facility not available

/usr/sbin/swap -s

total: 1734796k bytes allocated + 0k reserved = 1734796k used, 65374068k available

dmi

prtdiag

prtdiag can only be run in the global zone

devices

/usr/bin/kstat -p

/usr/bin/kstat -p | grep sderr:0:sd0
sderr:0:sd0,err:class   device_error
sderr:0:sd0,err:crtime  3061998,31354509
sderr:0:sd0,err:Device Not Ready        0
sderr:0:sd0,err:Hard Errors     0
sderr:0:sd0,err:Illegal Request 0
sderr:0:sd0,err:Media Error     0
sderr:0:sd0,err:No Device       0
sderr:0:sd0,err:Non-Aligned Writes      0
sderr:0:sd0,err:Predictive Failure Analysis     0
sderr:0:sd0,err:Product SAMSUNG 0000000000
sderr:0:sd0,err:Recoverable     0
sderr:0:sd0,err:Revision        003Q
sderr:0:sd0,err:Serial No       00000000000000
sderr:0:sd0,err:Size    960197124096
sderr:0:sd0,err:snaptime        8831505,71770339
sderr:0:sd0,err:Soft Errors     0
sderr:0:sd0,err:Transport Errors        0
sderr:0:sd0,err:Vendor  ATA  

uptime

/usr/bin/kstat -p unix:0:system_misc:snaptime

unix:0:system_misc:snaptime 8829613,08456415

rc, out, err = self.module.run_command('/usr/bin/kstat -p unix:0:system_misc:snaptime')

cpu info

/usr/bin/kstat cpu_info

module: cpu_info                        instance: 0     
name:   cpu_info0                       class:    misc
        brand                           Intel(r) Xeon(r) CPU           X7560  @ 2.27GHz
        cache_id                        0
        chip_id                         0
        clock_MHz                       1067
        clog_id                         0
        core_id                         0
        cpu_type                        i386
        crtime                          3061999,48840801
        cstates_count                   1175292894:53639373:942177828
        cstates_nsec                    5487277795197740:106145173266995:6375238769968485
        current_clock_Hz                1067000000
        current_cstate                  3
        current_pstate                  10
        family                          6
        fpu_type                        i387 compatible
        implementation                  x86 (chipid 0x0 GenuineIntel 206E6 family 6 model 46 step 6 clock 2267 MHz)
        max_ncpu_per_chip               32
        max_ncpu_per_core               2
        max_pwrcap                      0
        model                           46
        ncore_per_chip                  8
        ncpu_per_chip                   16
        pg_id                           4
        pkg_core_id                     0
        pstates_count                   12685179:0:0:0:0:0:0:0:0:0:12685179
        pstates_nsec                    5662742871431624:0:0:0:0:0:0:0:0:0:3166905738835199
        snaptime                        8829648,60739034
        socket_type                     Unknown
        state                           on-line
        state_begin                     1502477963
        stepping                        6
        supported_frequencies_Hz        1067000000:1200000000:1333000000:1467000000:1600000000:1733000000:1867000000:2000000000:2133000000:2267000000:2268000000
        supported_max_cstates           2
        supported_max_pstates           10
        vendor_id                       GenuineIntel

module: cpu_info                        instance: 1  
... (next cpu same as above)

mounts

Needs the contents of /etc/mtab

The correct file is /etc/mnttab (but the module references the right file I think)

Is Tab separated and schould work with

rpool/ROOT/solaris-24   /       zfs     rw,nodevices,setuid,nonbmand,exec,rstchown,xattr,noatime,mountpoint=/zones/zonename/root/,zone=zonename,nozonemod,sharezone=14,dev=44900c7    1504299109
rpool/ROOT/solaris-24/var       /var    zfs     rw,nodevices,setuid,nonbmand,exec,rstchown,xattr,noatime,mountpoint=/zones/zonename/root/var,zone=zonename,nozonemod,sharezone=14,dev=44900c8 1504299109
/dev    /dev    dev     zone=zonename,nozonemod,sharezone=14,dev=8b4000e       1504299109
proc    /proc   proc    nodevices,zone=zonename,sharezone=14,dev=8b8000e       1504299111
ctfs    /system/contract        ctfs    nodevices,zone=zonename,sharezone=14,dev=8c0000f       1504299111
mnttab  /etc/mnttab     mntfs   nodevices,zone=zonename,sharezone=14,dev=8c4000f       1504299111
...

passw0rd123 commented Oct 17, 2017

If possible, could you include output from some of the commands hardware.py runs to collect sunos facts?

Sure

memory

/usr/sbin/prtconf

System Configuration:  Oracle Corporation  i86pc
Memory size: 524279 Megabytes
System Peripherals (Software Nodes):

prtconf: devinfo facility not available

/usr/sbin/swap -s

total: 1734796k bytes allocated + 0k reserved = 1734796k used, 65374068k available

dmi

prtdiag

prtdiag can only be run in the global zone

devices

/usr/bin/kstat -p

/usr/bin/kstat -p | grep sderr:0:sd0
sderr:0:sd0,err:class   device_error
sderr:0:sd0,err:crtime  3061998,31354509
sderr:0:sd0,err:Device Not Ready        0
sderr:0:sd0,err:Hard Errors     0
sderr:0:sd0,err:Illegal Request 0
sderr:0:sd0,err:Media Error     0
sderr:0:sd0,err:No Device       0
sderr:0:sd0,err:Non-Aligned Writes      0
sderr:0:sd0,err:Predictive Failure Analysis     0
sderr:0:sd0,err:Product SAMSUNG 0000000000
sderr:0:sd0,err:Recoverable     0
sderr:0:sd0,err:Revision        003Q
sderr:0:sd0,err:Serial No       00000000000000
sderr:0:sd0,err:Size    960197124096
sderr:0:sd0,err:snaptime        8831505,71770339
sderr:0:sd0,err:Soft Errors     0
sderr:0:sd0,err:Transport Errors        0
sderr:0:sd0,err:Vendor  ATA  

uptime

/usr/bin/kstat -p unix:0:system_misc:snaptime

unix:0:system_misc:snaptime 8829613,08456415

rc, out, err = self.module.run_command('/usr/bin/kstat -p unix:0:system_misc:snaptime')

cpu info

/usr/bin/kstat cpu_info

module: cpu_info                        instance: 0     
name:   cpu_info0                       class:    misc
        brand                           Intel(r) Xeon(r) CPU           X7560  @ 2.27GHz
        cache_id                        0
        chip_id                         0
        clock_MHz                       1067
        clog_id                         0
        core_id                         0
        cpu_type                        i386
        crtime                          3061999,48840801
        cstates_count                   1175292894:53639373:942177828
        cstates_nsec                    5487277795197740:106145173266995:6375238769968485
        current_clock_Hz                1067000000
        current_cstate                  3
        current_pstate                  10
        family                          6
        fpu_type                        i387 compatible
        implementation                  x86 (chipid 0x0 GenuineIntel 206E6 family 6 model 46 step 6 clock 2267 MHz)
        max_ncpu_per_chip               32
        max_ncpu_per_core               2
        max_pwrcap                      0
        model                           46
        ncore_per_chip                  8
        ncpu_per_chip                   16
        pg_id                           4
        pkg_core_id                     0
        pstates_count                   12685179:0:0:0:0:0:0:0:0:0:12685179
        pstates_nsec                    5662742871431624:0:0:0:0:0:0:0:0:0:3166905738835199
        snaptime                        8829648,60739034
        socket_type                     Unknown
        state                           on-line
        state_begin                     1502477963
        stepping                        6
        supported_frequencies_Hz        1067000000:1200000000:1333000000:1467000000:1600000000:1733000000:1867000000:2000000000:2133000000:2267000000:2268000000
        supported_max_cstates           2
        supported_max_pstates           10
        vendor_id                       GenuineIntel

module: cpu_info                        instance: 1  
... (next cpu same as above)

mounts

Needs the contents of /etc/mtab

The correct file is /etc/mnttab (but the module references the right file I think)

Is Tab separated and schould work with

rpool/ROOT/solaris-24   /       zfs     rw,nodevices,setuid,nonbmand,exec,rstchown,xattr,noatime,mountpoint=/zones/zonename/root/,zone=zonename,nozonemod,sharezone=14,dev=44900c7    1504299109
rpool/ROOT/solaris-24/var       /var    zfs     rw,nodevices,setuid,nonbmand,exec,rstchown,xattr,noatime,mountpoint=/zones/zonename/root/var,zone=zonename,nozonemod,sharezone=14,dev=44900c8 1504299109
/dev    /dev    dev     zone=zonename,nozonemod,sharezone=14,dev=8b4000e       1504299109
proc    /proc   proc    nodevices,zone=zonename,sharezone=14,dev=8b8000e       1504299111
ctfs    /system/contract        ctfs    nodevices,zone=zonename,sharezone=14,dev=8c0000f       1504299111
mnttab  /etc/mnttab     mntfs   nodevices,zone=zonename,sharezone=14,dev=8c4000f       1504299111
...
@drboone

This comment has been minimized.

Show comment
Hide comment
@drboone

drboone Oct 27, 2017

This bug also affects triton/smartos.

drboone commented Oct 27, 2017

This bug also affects triton/smartos.

@christianbrensing

This comment has been minimized.

Show comment
Hide comment
@christianbrensing

christianbrensing Nov 8, 2017

Affects Solaris 10 as well.

christianbrensing commented Nov 8, 2017

Affects Solaris 10 as well.

@christianbrensing

This comment has been minimized.

Show comment
Hide comment
@christianbrensing

christianbrensing Nov 8, 2017

If I follow the instructions for the remote debugging of an ansible module, the execution of the setup module on the remote host raises the following error:

KeyError('devices',)

I guess this comes from line 240 in module_utils/facts/hardware/sunos.py.

I hope this helps narrowing down the problem.

christianbrensing commented Nov 8, 2017

If I follow the instructions for the remote debugging of an ansible module, the execution of the setup module on the remote host raises the following error:

KeyError('devices',)

I guess this comes from line 240 in module_utils/facts/hardware/sunos.py.

I hope this helps narrowing down the problem.

@jcea

This comment has been minimized.

Show comment
Hide comment
@jcea

jcea Nov 24, 2017

Contributor

Hitting this too. Showstopper. Going back to ansible 2.3.2 for now :-(. Running SmartOS.

Contributor

jcea commented Nov 24, 2017

Hitting this too. Showstopper. Going back to ansible 2.3.2 for now :-(. Running SmartOS.

@xen0l

This comment has been minimized.

Show comment
Hide comment
@xen0l

xen0l Nov 25, 2017

Contributor

@bcoca @alikins this should be included in the next release as jcea's PR fixes the problem.

Contributor

xen0l commented Nov 25, 2017

@bcoca @alikins this should be included in the next release as jcea's PR fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment