cea-hpc/shine

wrong stop action rc when a target is mounted twice

Closed this issue · 3 comments

When a target is also mounted as ldiskfs, a shine stop action to this target leads to incoherent return code (0), the ldiskfs mount point is dismounted but the lustre one is still online (stop output result is correct in that sense).

In case of multi-mounted target, we should detect it, either: dismount all associated mount points (probably the best way?), or at last return an unexpected rc for stop as the lustre target is still mounted.

[root@node1 ~] # shine status -f bwork
= FILESYSTEM STATUS (bwork) =
TYPE  # STATUS  NODES
----  - ------  -----
MGT   1 online  node115
MDT   1 online  node115
OST  48 online  node[124-127]
CLI   1 mounted node12

[root@node1 ~] # ssh node115
[root@node115 ~] # df
/dev/sdb1                 54420      6924      44688  14% /mnt/bwork/mgt
/dev/sdb2             365364336  36043708  304958460  11% /mnt/bwork/mdt/0

[root@node115 ~] # mkdir /mnt/ldiskfs
[root@node115 ~] # mount -t ldiskfs /dev/sdb1 /mnt/ldiskfs
[root@node115 ~] # df
Filesystem            1K-blocks      Used  Available Use% Mounted on
/dev/sdb1                 54420      6924      44688  14% /mnt/bwork/mgt
/dev/sdb2             365364336  36043708  304958460  11% /mnt/bwork/mdt/0
/dev/sdb1                 54420      6924      44688  14% /mnt/ldiskfs

[root@node115 ~] # shine status -f bwork -t mgt -L
Status of MGS (/dev/sdb1) ...
Status of MGS (/dev/sdb1) succeeded
= FILESYSTEM STATUS (bwork) =
TYPE # STATUS NODES
---- - ------ -----
MGT  1 online node115

[root@node115 ~] # shine stop -f bwork -t mgt -L
Stop of MGS (/dev/sdb1) ...
Stop of MGS (/dev/sdb1) succeeded (0.0 sec)
Stop successful.
= FILESYSTEM STATUS (bwork) =
TYPE # STATUS NODES
---- - ------ -----
MGT  1 online node115

[root@node115 ~] # echo $?
0

[root@node115 ~] # df
Filesystem            1K-blocks      Used  Available Use% Mounted on
/dev/sdb1                 54420      6924      44688  14% /mnt/bwork/mgt
/dev/sdb2             365364336  36043708  304958460  11% /mnt/bwork/mdt/0

Reported by: thiell

  • Version: --> 1.3.1

Original comment by: thiell

  • status: new --> closed
  • assigned_to: Aurélien Degrémont
  • Resolution: --> fixed

Original comment by: degremont

Fixed in [f4e89b]

This could be improved later either unmounting using the mount path and/or checking expected state again at ev_close in case of success.

Original comment by: degremont