List:Commits« Previous MessageNext Message »
From:Magnus Svensson Date:December 11 2008 1:56pm
Subject:Re: bk commit into 5.0 tree (lzhou:1.2477) BUG#29275
View as plain text  
lzhou@stripped wrote:
> ChangeSet@stripped, 2007-08-15 13:41:46+00:00, lzhou@dev3-63.(none) +1 -0
>   BUG#29275 Correct message when do restart
> 
> --- 1.75/ndb/src/mgmclient/CommandInterpreter.cpp	2007-08-15 13:42:01 +00:00
> +++ 1.76/ndb/src/mgmclient/CommandInterpreter.cpp	2007-08-15 13:42:01 +00:00
> @@ -2026,8 +2026,33 @@ CommandInterpreter::executeRestart(Vecto
>      return -1;
>    }
>  
> -  if (!nostart)
> -    ndbout_c("Shutting down nodes with \"-n, no start\" option, to subsequently
> start the nodes.");

magnus: Removing this message seems good as it is confusing.

> +  struct ndb_mgm_cluster_state *cl = ndb_mgm_get_status(m_mgmsrv);
> +  if(cl == NULL) 
> +  {
> +    ndbout_c("Could not get status");
> +    printError();
> +    return -1;
> +  }
> +  NdbAutoPtr<char> ap1((char*)cl);
> +
> +  for (int i= 0; i < no_of_nodes; i++)
> +  {
> +    int j = 0;
> +    while((j < cl->no_of_nodes) && cl->node_states[j].node_id !=
> node_ids[i])
> +      j++;
> +    if(cl->node_states[j].node_id != node_ids[i]) 
> +    {
> +      ndbout << node_ids[i] << ": Node not found" << endl;
> +      return -1;
> +    }
> +
> +    if(cl->node_states[j].node_type == NDB_MGM_NODE_TYPE_MGM)
> +    {
> +      ndbout << "Shutting down MGM node";
> +      ndbout << " " << node_ids[i];
> +      ndbout_c(", for restart.");

magnus: rewrite as
          ndbout << "Shutting down MGM node"
                 << " " << node_ids[i] << " for restart" << endl;

> +    }
> +  }
>  
>    result= ndb_mgm_restart3(m_mgmsrv, no_of_nodes, node_ids,
>                             initialstart, nostart, abort, &need_disconnect);
> 

magnus: in addition to this, we should look at follogin Stewarts advice 
about changing "Node X: Node shutdown initiated" -> "Node X: Node 
restart initiated" if tt is a restart. But maybe that is another bug?

/ Magnus

Thread
bk commit into 5.0 tree (lzhou:1.2477) BUG#29275lzhou15 Aug
  • Re: bk commit into 5.0 tree (lzhou:1.2477) BUG#29275Magnus Svensson11 Dec