Skip to content
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

Check path only if path reinstate successfully when reinstating path … #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JunhuiTang
Copy link

…by CLI

We fail a path, and suspend the map which the path belongs to, then reinstate the path by CLI and it returned with a fail message, the problem is: 1) There is a lot of messages that indicate the path status is up but reinstate fail; 2) When we resume the map, the path change status to active from failed automatically though it's failed when we reinstated path before.

…by CLI

We fail a path, and suspend the map which the path belongs to, then reinstate the path by CLI and it returned with a fail message, the problem is: 1) There is a lot of messages that indicate the path status is up but reinstate fail; 2) When we resume the map, the path change status to active from failed automatically though it's failed when we reinstated path before.
@JunhuiTang
Copy link
Author

@hreinecke

hreinecke pushed a commit that referenced this pull request Nov 28, 2016
Problem:
Multipathd segment faulty occured when device policy was configured in multipath.conf as follow:
#This is a device configuration just for COMPELNT device
devices {
       device {
               vendor                  COMPELNT
               dev_loss_tmo            120
               scheduler               deadline
       }
}

The call trace is:
Program received signal SIGSEGV, Segmentation fault.
0x00007f4eaaf49251 in __strstr_sse2 () from /lib64/libc.so.6
(gdb) bt
#0  0x00007f4eaaf49251 in __strstr_sse2 () from /lib64/libc.so.6
#1  0x00007f4eabba879c in add_feature (f=f@entry=0x211b248, n=n@entry=0x7f4eabbc530a queue_if_no_path)
    at structs.c:524
#2  0x00007f4eabba6993 in merge_hwe (src=0x2148c70, dst=0x211b220) at config.c:359
#3  factorize_hwtable (hw=0x214b800, n=n@entry=77) at config.c:452
#4  0x00007f4eabba7850 in load_config (file=file@entry=0x4144c8 /etc/multipath.conf) at config.c:651
#5  0x0000000000408959 in reconfigure (vecs=vecs@entry=0x2128ae0) at main.c:2078
#6  0x00000000004063c6 in child (param=0x0) at main.c:2483
#7  main (argc=<optimized out>, argv=<optimized out>) at main.c:2725
(gdb) up
#1  0x00007f4eabba879c in add_feature (f=f@entry=0x211b248, n=n@entry=0x7f4eabbc530a queue_if_no_path)
    at structs.c:524
524             if (strstr(*f, n))
(gdb) p *f
 = 0x0

Reasons:
When multipathd loads config, it will call merge_hwe() to merge the features between default_hw[] and config.
If the vender is not configured features in default_hw[], dst->features's value will be null. So strstr()'s first
parameter *f is null in add_feature(),too.

Signed-off-by: wei huang <[email protected]>
mwilck pushed a commit that referenced this pull request Aug 28, 2017
Problem:
Multipathd segment faulty occured when device policy was configured in multipath.conf as follow:
#This is a device configuration just for COMPELNT device
devices {
       device {
               vendor                  COMPELNT
               dev_loss_tmo            120
               scheduler               deadline
       }
}

The call trace is:
Program received signal SIGSEGV, Segmentation fault.
0x00007f4eaaf49251 in __strstr_sse2 () from /lib64/libc.so.6
(gdb) bt
#0  0x00007f4eaaf49251 in __strstr_sse2 () from /lib64/libc.so.6
#1  0x00007f4eabba879c in add_feature (f=f@entry=0x211b248, n=n@entry=0x7f4eabbc530a queue_if_no_path)
    at structs.c:524
#2  0x00007f4eabba6993 in merge_hwe (src=0x2148c70, dst=0x211b220) at config.c:359
#3  factorize_hwtable (hw=0x214b800, n=n@entry=77) at config.c:452
#4  0x00007f4eabba7850 in load_config (file=file@entry=0x4144c8 /etc/multipath.conf) at config.c:651
#5  0x0000000000408959 in reconfigure (vecs=vecs@entry=0x2128ae0) at main.c:2078
#6  0x00000000004063c6 in child (param=0x0) at main.c:2483
#7  main (argc=<optimized out>, argv=<optimized out>) at main.c:2725
(gdb) up
#1  0x00007f4eabba879c in add_feature (f=f@entry=0x211b248, n=n@entry=0x7f4eabbc530a queue_if_no_path)
    at structs.c:524
524             if (strstr(*f, n))
(gdb) p *f
 = 0x0

Reasons:
When multipathd loads config, it will call merge_hwe() to merge the features between default_hw[] and config.
If the vender is not configured features in default_hw[], dst->features's value will be null. So strstr()'s first
parameter *f is null in add_feature(),too.

Signed-off-by: wei huang <[email protected]>
(cherry picked from commit b1ecdd4)
@mwilck
Copy link
Contributor

mwilck commented Dec 18, 2020

This looks good to me. However, please resubmit to dm-devel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants