action #46316

[sle][functional][y] - adapt iscsi MM test according to hints from bsc#1115648

Added by mloviska about 1 year ago. Updated 7 months ago.

Status:ResolvedStart date:17/01/2019
Priority:NormalDue date:16/07/2019
Assignee:mloviska% Done:

0%

Category:Enhancement to existing testsEstimated time:3.00 hours
Target version:QA - future
Difficulty:
Duration: 129

Description

Iscsi initiator takes following step:

  • logon to an iSCSI target
  • make a single partition
  • make an EXT4 filesystem on that partition
  • mount that partition
  • write to a file there
  • read from the file there

We are assuming that these steps are synchronous. For example, logging in to a target will create a local disc device, but it takes a moment, since udev actually handles it. And making a single partition actually causes the kernel code to re-read the starting part of the disc in order for it to recognize that you now have a partition table when before there was none. In both of these examples, the result is asynchronous. So we really need to be able to wait for your desired result before going on.

To test this, perhaps you can just add some "sleep" calls in your openQA test to see if timing might be your issue. I'd suggest a "sleep 2" (just to be overly safe) between the "make a partition" step and the "make an EXT4 filesystem" step, since making the EXT4 filesystem seems to be the step that sometimes fails.

Lastly, looking back to your initial error text, it looks like the test is trying to restart open-iscsi.

[  320.908142] systemd[1]: Started Hostname Service.
[  326.785627] systemd[1]: Started Open-iSCSI.
[  326.871707] systemd[1]: Stopping Open-iSCSI...
[  417.006083] systemd[1]: iscsid.service: State 'stop-sigterm' timed out. Killing.
[  417.027160] systemd[1]: iscsid.service: Killing process 3113 (iscsid) with signal SIGKILL.
[  417.030997] systemd[1]: iscsid.service: Main process exited, code=killed, status=9/KILL
[  417.033006] systemd[1]: Stopped Open-iSCSI.
[  417.039294] systemd[1]: iscsid.service: Unit entered failed state.
[  417.051231] systemd[1]: iscsid.service: Failed with result 'timeout'.
[  417.053334] systemd[1]: Started Open-iSCSI.
[  432.885258] iscsid[3140]: iscsid: Connection1:0 to [target: iqn.2016-02.de.openqa:132, portal: 10.0.2.1,3260] through [iface: default] is operational now

the "stop" part fails, resulting in systemd having to send a kill signal to oiscsi to stop. The "stop-sigterm failed" message is not good. And then to restart the service when it is in a failed state leads to kernel initiator/target communications, in the form of 3 different reconnection attempts. It almost looks like it keeps logging into the target but the target keeps booting it off?

As far as the test, it would be good to tear it down correctly, so that repeated connections to the target do not cause problems. That means we need to log out of the target after unmounting the disc.

History

#1 Updated by mloviska about 1 year ago

  • Description updated (diff)

#2 Updated by mloviska about 1 year ago

  • Status changed from New to In Progress

#4 Updated by mloviska about 1 year ago

  • Status changed from In Progress to Blocked

Blocked by https://bugzilla.suse.com/show_bug.cgi?id=1123381 on sle12sp5. Discovery auth is enabled along with login auth.
Works fine on sle15sp1:
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/6645

#5 Updated by okurz about 1 year ago

  • Target version set to future

@mloviska care to set https://bugzilla.suse.com/show_bug.cgi?id=1123381 as blocker and update this ticket's due date depending on when you want to check on the bug again?

#6 Updated by mloviska about 1 year ago

I will check in the middle of next sprint. I do not expect many code updates for sle12sp5, just only needlework.

#7 Updated by riafarov about 1 year ago

  • Due date changed from 12/02/2019 to 12/03/2019

We expect the bug to get fixed.

#8 Updated by mloviska 12 months ago

  • Status changed from Blocked to In Progress

#9 Updated by mloviska 12 months ago

  • Status changed from In Progress to Blocked

#12 Updated by riafarov 12 months ago

  • Due date changed from 12/03/2019 to 09/04/2019

SR is for maintenance, we might need another SR for SP5, let's check if gets unblocked.

#14 Updated by riafarov 11 months ago

  • Due date changed from 09/04/2019 to 23/04/2019

Latest SP5 build still contains version 3.2.1. I've commented in the bug, I hope Knut will help us there and create SR for SP5, otherwise we can clone one for SP4.

#15 Updated by riafarov 10 months ago

  • Due date changed from 23/04/2019 to 04/06/2019

#16 Updated by riafarov 9 months ago

  • Due date changed from 04/06/2019 to 18/06/2019
  • Status changed from Blocked to Workable
  • Assignee deleted (mloviska)

SP5 finally got yast2-iscsi-lio-server version yast2-iscsi-lio-server-3.2.2-1
As there is PR already, let's try to get it merged.

#17 Updated by riafarov 9 months ago

  • Estimated time set to 3.00

It might be that we need extra changes for SLE 12 SP5, but in general code from the PR should work straight away.
Requires MM test.

#18 Updated by riafarov 9 months ago

  • Due date changed from 18/06/2019 to 02/07/2019

#19 Updated by mloviska 8 months ago

  • Status changed from Workable to In Progress
  • Assignee set to mloviska

#20 Updated by mloviska 8 months ago

TEST_DATA:
$VAR1 = {
          'network_conf' => {
                              'ip' => '10.0.2.3/24'
                            },
          'initiator_conf' => {
                                'acl_pass' => 'susetesting',
                                'id' => 'init',
                                'name' => 'iqn.2016-02.de.openqa',
                                'acl_initiator_user' => 'test_initiator'
                              },
          'target_conf' => {
                             'name' => 'iqn.2016-02.de.openqa:init',
                             'lun' => '/root/iscsi-disk',
                             'id' => 'target',
                             'acl_target_user' => 'test_target',
                             'target_ip' => '10.0.2.1',
                             'acl_pass' => 'susetesting'
                           }
        };

this is nice, yaml schedule rocks!

#21 Updated by mloviska 8 months ago

  • Status changed from In Progress to Feedback

#22 Updated by riafarov 8 months ago

  • Due date changed from 02/07/2019 to 16/07/2019

#23 Updated by mloviska 8 months ago

  • Status changed from Feedback to In Progress

#24 Updated by mloviska 8 months ago

  • Status changed from In Progress to Feedback

#25 Updated by mloviska 8 months ago

  • updated variables.md PR

#26 Updated by mloviska 8 months ago

#29 Updated by mloviska 8 months ago

#30 Updated by riafarov 7 months ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF