- Nov 03, 2009
-
-
Iustin Pop authored
A newer version of pylint, more warnings… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 26, 2009
-
-
Guido Trotter authored
We were already half-doing it, but this completes the process. 1) We don't maintain a list of ips or an ip->instance map 2) We add a new link,ip->instance map (link->ips list we had) 3) We add the link parameter to GetInstanceByIp (making it GetInstanceByLinkIp) 4) We change the GetInstanceByIp caller to pass None as link (thus for now using only the default link) Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
GetDefaultNicParams returns the default nic parameters. GetDefaultNicLink returns the default nic link. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 12, 2009
-
-
Michael Hanselmann authored
Found using pylint and epydoc. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Sep 30, 2009
-
-
Luca Bigliardi authored
The query now accepts a link parameter. Signed-off-by:
Luca Bigliardi <shammash@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Sep 22, 2009
-
-
Luca Bigliardi authored
Extend confd to answer queries about instances IPs. Signed-off-by:
Luca Bigliardi <shammash@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 16, 2009
-
-
Luca Bigliardi authored
Extend confd to answer queries about nodes primary IPs and master candidates primary IPs. Signed-off-by:
Luca Bigliardi <shammash@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 11, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Luca Bigliardi <shammash@google.com>
-
- Aug 31, 2009
-
-
Guido Trotter authored
We haven't had that config file entry for a while. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Aug 28, 2009
-
-
Guido Trotter authored
Also, catch EnvironmentError, rather than IOError, when trying to read the file. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Aug 12, 2009
-
-
Guido Trotter authored
Add the following functions to SimpleConfigReader: GetInstanceByIp, nic ip -> instance name GetNodePrimaryIp, node name -> node primary ip GetInstancePrimaryNode, instance name -> primary node For the first one we precalculate the _ip_to_instance, so we don't have to loop over all instances for each query. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Adding a way to retrieve the three node status flags, all in one go, from SimpleConfigReader. Non-existing nodes are handled by returning "None". Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 10, 2009
-
-
Guido Trotter authored
If for some reason we try to call Reload twice but the config file hasn't changed, we don't want to load it again. Use stat() on the file to cheaply avoid that situation. We also return a boolean value, according to whether we have reloaded the config or not. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Since we use it also to load the config file initially we rename the Reload function to _Load. Then we re-export it as Reload to clients (since for them it's a reload). Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 07, 2009
-
-
Guido Trotter authored
GetConfigSerialNo and GetClusterSerialNo return respectively the serial number for the config and for the cluster object. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
Rather than initializing the config statically at class creation time, we load it every time Reload() is called. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 06, 2009
-
-
Guido Trotter authored
Handling both IOErrors and ValueErrors (thrown by the simplejson loader) Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This function checks that the current node is a master candidate, and terminates otherwise. It will be used upon ganeti-confd startup. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 05, 2009
-
-
Luca Bigliardi authored
This will be used when querying confd, in order not to rely on DNS being available. Signed-off-by:
Luca Bigliardi <shammash@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Luca Bigliardi authored
Having a list of primary/secondary IPs of all the nodes in ssconf can be useful for scripts/hooks which need to automatically configure network properties for the whole cluster (e.g.: ipsec/netfilter rules) without relying on a working DNS. Signed-off-by:
Luca Bigliardi <shammash@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jul 16, 2009
-
-
Guido Trotter authored
InitConfig currently creates the cluster config_data, then puts it into a dict, passes it to SimpleConfigWriter to load it from a dict (which just reuses the dict value) and then saves it. The SimpleConfigWriter is then returned, but ignored. With this patch we just write out the config_data at InitConfig time, and thus can remove SimpleConfigWriter altogether. The now unused SimpleConfigReader.FromDict is also gone. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 14, 2009
-
-
Guido Trotter authored
This function is not used. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jun 24, 2009
-
-
Guido Trotter authored
Making ssconf._ReadFile a wrapper over utils.ReadFile Signed-off-by:
Guido Trotter <ultrotter@google.com>
-
- May 25, 2009
-
-
Iustin Pop authored
Currently the rapi tags query implementation is similar to the command line one: it submits OpGetTags jobs. This not good, since this being an API it can be used a lot and can pollute the job queue with many such trivial jobs. This patch converts it to use either queries (for nodes/instances) or direct read from ssconf (for the cluster case). For ssconf, we added a function to the ssconf.SimpleStore class for reading the tags. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Apr 06, 2009
-
-
Iustin Pop authored
Since the cluster tags are/should be more-or-less static, add them as an ssconf key, so that querying them is possible without creating a job/requiring the masterd to be running. Reviewed-by: imsnah
-
- Feb 04, 2009
-
-
Iustin Pop authored
This patch adds the online node list and instance list to the ssconf keys. In order to do distribute correctly the instance list, we need to update the cluster serial number on instance additions and removals. The patch also changes the permissions on the ssconf files to be 0444: - no write for root, in order to signal that these file should not be modified - read for everyone since the files don't contain sensitive data anymore (and permissions can be controlled via the parent directory if needed) The patch also fixes a small typo on gnt-cluster. Reviewed-by: ultrotter
-
- Jan 09, 2009
-
-
Iustin Pop authored
The patch adds a new ssconf file containing the ganeti version. Reviewed-by: imsnah
-
- Dec 05, 2008
-
-
Iustin Pop authored
The patch also changes the various node list generation to be more consistent. Reviewed-by: imsnah
-
Iustin Pop authored
Currently we add a newline in the ssconf writeout process, even if the file is empty. We chage this case so that lists of values (e.g. offline nodes) are correct (not a list of one empty element). Reviewed-by: imsnah
-
- Dec 02, 2008
-
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
Reviewed-by: imsnah
-
Iustin Pop authored
We have (again) the KeyToFilename function, so we move the writing of the files to a method under SimpleStore. Reviewed-by: imsnah
-
Iustin Pop authored
This partially reverts the "Get rid of ssconf" patch. It adds back a simpler version of the SimpleStore class, and drops the WritableSimpleStore class. The new version of the class also has node_list as a new key, and increases the size of the keys so that big clusters will fit the node list. Also, the SS_* constants are moved to constants.py, since the ConfigWriter class will need them too in order to generate the values dictionary. It also changes the GetMasterAndMyself function to use the SimpleStore by default, and the backend._GetConfig to use it too (it has all the needed keys). Reviewed-by: imsnah
-
- Nov 25, 2008
-
-
Michael Hanselmann authored
Instead of parsing the configuration on the node, we pass the ssconf values from the master. Reviewed-by: iustinp
-
- Nov 20, 2008
-
-
Michael Hanselmann authored
This function will be used to write ssconf files from the node daemon. By creating a lock file, we synchronize different child processes of ganeti-noded to not overwrite each other's changes. Also, external processes could use this lock to make sure they don't read ssconf files while changes are going on. The socket module is not used (anymore) in ganeti.ssconf, removing it. Reviewed-by: iustinp
-
- Oct 08, 2008
-
-
Oleksiy Mishchenko authored
Reviewed-by: iustinp
-
- Oct 05, 2008
-
-
Iustin Pop authored
The ssconf migration left this out. Reviwed-by: imsnah,ultrotter
-
- Oct 01, 2008
-
-
Michael Hanselmann authored
Remove leftovers from ssconf. Reviewed-by: iustinp
-
Michael Hanselmann authored
This will be used to read the configuration file in the node daemon. The write functionality is needed for master failover. Reviewed-by: iustinp
-
- Jul 30, 2008
-
-
Iustin Pop authored
This patch adds a check that we are on the master after failing to connect to the socket, and log nicely the master name. Reviewed-by: ultrotter
-