Carla Mott wrote on 08/04/2010 05:22 PM:
> Hi,
>
> I created an instance using create-local-instance and found unexpected
> behavior. In the case where create-local-instance is running on a
> machine other than the DAS, create-local-instance should implicitly
> create a node whose name is the name of the host the command is running
> on. So if the command is running on host bar then the node element on
> the DAS machine should have the name bar and the node-host should also
> be bar.
> The wrong behavior happens if I have created a node say node1 which
> points to bar. This means that on machine bar there is a nodeagents dir
> with a directory node1. create-local-instance will use the node 'node1'
> when it creates instances instead of creating a new node called bar and
> a corresponding directory bar under nodeagents. This is wrong.
Why?
In general, if one of the thing you need already exists, we just use it.
Why shouldn't it default to using the existing node1 node?
> create-local-instance seems to look for a node and use that if available
> otherwise it creates a node using the host name.
That's what I would expect.
> Now if I reverse the sequence of the commands I can create a node with
> host name using create-local-instance if there are no nodes already
> created. I can also create a node using create-node-ssh and then the
> instance using create-instance using that node and all looks right on
> the remote host.
A single domain should probably be limited to a single node on a given
host (name? IP address?). The reason to have multiple nodes on a
machine is to support instances from multiple domains on that machine.
> With 3.1 users have the option to run commands on remote machines using
> SSH. It is not required however. When a user creates an instance using
> create-local-instance it should be assumed that he does *not* want to
> use SSH. Under the current scenario if only one node exists on a host
> create-local-instance will default to using that node regardless of how
> the node was created or if it specifies that SSH should be used. Once
> there are 2 nodes create-local-instance will prompt the user to specify
> the node he wants to use.
That's what I would expect. Why is that confusing?
> I'm not sure why the current implementation looks for a node and uses
> that if found. It should look for a node that is the same name as the
> host it is running on and if exists use that (underlying code will
> verify that the node is correct). If a node by that name is not found
> it should create it.
For a domain, there should be only one node on a given machine. If that
node has already been created and given a name the administrator likes,
why create a different node with a different name?