mainstoreBackup - Support: sr #109342, storeBackupMount doesn't pass...

 
 

sr #109342: storeBackupMount doesn't pass through error code

Submitter:  Hamish Moffatt <hmoffatt>
Submitted:  Mon 26 Jun 2017 06:01:01 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 30 Jun 2017 05:00:31 AM UTC, comment #2: 

Thank you.

Hamish Moffatt <hmoffatt>
Tue 27 Jun 2017 08:50:05 PM UTC, comment #1: 

Hi,
no, it's not intentional. It's better to set the exit code to 1 if storeBackup.pl fails. I'll change it.
Thanks, Heinz-Josef

Heinz-Josef Claes <hjclaes>
Group administrator
Mon 26 Jun 2017 06:01:01 AM UTC, original submission:  

Hi,
I am trying to run storeBackupMount to run storeBackupUpdateBackup. It looks like if storeBackupUpdateBackup fails, storeBackupMount does not return an error code?

I ran a test as follows:

root@backup-offsite:~# storeBackupMount.pl --storeBackupUpdateBackup "--foo" /net/backup/deltacache
BEGIN   2017.06.26 15:55:23 23853 starting storeBackupMount.pl
VERSION 2017.06.26 15:55:23 23853 storeBackupMount.pl, 3.5
INFO    2017.06.26 15:55:23 23853 trying to mount  /net/backup/deltacache
INFO    2017.06.26 15:55:24 23853 <mount /net/backup/deltacache> successfull
INFO    2017.06.26 15:55:24 23853 starting /usr/local/bin/storeBackupUpdateBackup.pl --foo
ERROR   2017.06.26 15:55:25 23853 </usr/local/bin/storeBackupUpdateBackup.pl> exited with status <255>
ERROR   2017.06.26 15:55:25 23853 exiting
INFO    2017.06.26 15:55:25 23853 trying to <umount /net/backup/deltacache>
INFO    2017.06.26 15:55:30 23853 <umount> /net/backup/deltacache successfull
END     2017.06.26 15:55:30 23853 finished storeBackupMount.pl

root@backup-offsite:~# echo $?
0



In the source code it looks like $main::exit is only set to 1 if there is a timeout, not from a non-zero return code. Is that intentional?


Thanks,
Hamish

Hamish Moffatt <hmoffatt>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hjclaes (Posted a comment)
  • -email is unavailable- added by hmoffatt (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code