Kaperstone / mogilefs

Automatically exported from code.google.com/p/mogilefs
0 stars 0 forks source link

mogadm host modify --status can cause all trackers to fail when typo for status (e.g 'alivew') #57

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Try to change the status of a host to 'alivew'
For example:
mogadm --trackers=hmogile:7001 host modify hfs40 --status=alivew

This will null out the corresponding host sttus in the DB, even though the 
operation failed
2.
3.

What is the expected output? What do you see instead?

Expected: "unknown_state Invalid/unknown state", with no change on the DB for 
host status
Instead: "failure Operation failed", DB changed to "" for host status 

What version of the product are you using? On what operating system?

MogileFS::Server        INST_VERSION 2.46
MogileFS::Utils         INST_VERSION 2.19
Linux                   2.6.18-128.1.10.el5.centos.plus  
Perl                    This is perl, v5.8.8 built for x86_64-linux-thread-multi

Please provide any additional information below.

We encountered an issue today where a typo in the host status change caused the 
entry in the DB to be blank, and then causing all the trackers to fail.

The command entered was:

mogadm --trackers=hmogile:7001 host modify hfs40  --status=alivew
==> Failure modifying host: failure Operation failed

This resulted in the "status" column of the "host" table to be nulled out for 
the matching host/hostid, even though the output indicated that the operation 
had failed.

Note that a completely wrong status will yield a different response, and will 
not update the DB:

mogadm --trackers=hmogile:7001 host modify hfs40  --status=klsd
==> Failure modifying host: unknown_state Invalid/unknown state

Original issue reported on code.google.com by pben...@sugarsync.com on 15 Feb 2012 at 11:12

GoogleCodeExporter commented 8 years ago
This was fixed in 2.61 by Pyry and Eric! Closing it out.

Original comment by dorma...@rydia.net on 20 Jun 2012 at 12:59