hugowan / maatkit

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

mk-audit dies on the "rare case" when it can find no defaults files anywhere #113

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I coded once:
   if ( scalar @defaults_file_ops == 0 ) {
      # This would be a rare case in which the mysqld binary was not
      # given a --defaults-file opt, and none of the default defaults
      # files parsed from mysqld --help --verbose exist.
      my $self_dump = Dumper($self);
      MKDEBUG && _d("$self_dump");
      die 'MySQL instance has no valid defaults files.'
   }
thinking happily to myself, "Well, this will probably never happen, but if
it does, at least we're catching it, but still... it will probably never
happen." Then along comes Ryan and suddenly rare is so terribly frequent.

Original issue reported on code.google.com by dan...@percona.com on 28 Oct 2008 at 2:47

GoogleCodeExporter commented 9 years ago
Yes indeed, Ryan is working on a weird case where, although mysqld is running
according to ps, mk-audit cannot run 'mysqld --help --verbose' because it causes
system errors. Therefore, mk-audit can't get the list of default defaults files 
that
it needs. Now with r2459 this even more rare error is caught an mk-audit dies 
saying:
"Failed to get system variable values from mysqld by running $cmd"

So the problem was earlier on: not with defaults files parsing, but with 
mysqld/the
server itself. In any case, it has been handled.

Original comment by dan...@percona.com on 28 Oct 2008 at 3:15