saltstack-formulas / iscsi-formula

Manage iSCSI Target and Initiator via SaltStack (FreeBSD & GNU/Linux)
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
8 stars 7 forks source link

[BUG] iscsi states fail (1st run) until reboot (Arch/CentOS) #33

Open noelmcloughlin opened 4 years ago

noelmcloughlin commented 4 years ago

Your setup

Formula commit hash / release tag

Versions reports (master & minion)

Pillar / config used


Bug details

Describe the bug

The iscsi state fails on Archliux (travis and realtime). https://travis-ci.com/github/noelmcloughlin/iscsi-formula/jobs/320857106

       Summary for local
       -------------
       Succeeded: 68 (changed=49)
       Failed:    11
       -------------
       Total states run:     79
       Total run time:   93.135 s

[vagrant@arch ~]$ uptime
 13:10:50 up 2 days,  1 user,  load average: 0.00, 0.02, 0.01

Following a reboot, the same iscsi states work 100%. On CentOS only one service.running state fails => this can be addressed for Travis.

Steps to reproduce the bug

Expected behaviour

After reboot..

cloning iscsi-formula from saltstack-formulas ...

local:
    ----------
    base:
        - users
        - iscsi
run salt: this takes a while, please be patient ...
-------------
Succeeded: 52 (changed=15)
Failed:     0
-------------

[vagrant@arch ~]$ uptime
 13:30:50 up 15 min,  1 user,  load average: 0.00, 0.02, 0.01

Attempts to fix the bug

Additional context

noelmcloughlin commented 4 years ago

This could be option? https://github.com/error10/kexec-reboot

noelmcloughlin commented 4 years ago

Setting iscsi.target.enabled: false skips service.running for target service. That is the best solution for CentOS/Travis. Testing that. update - that worked for CentOS!!

noelmcloughlin commented 4 years ago

Test-kitchen has support for enduring reboots initiated by a Chef provisioner.

https://kitchen.ci/docs/reference/reboots/

Could this work with kitchen-salt?

myii commented 4 years ago

@noelmcloughlin It doesn't look like it. Best to ask in an issue there: