History | View | Annotate | Download (8.8 kB)
Further pylint disables, mostly for Unused args
Many of our functions have to follow a given API, and thus we have tokeep a given signature, but pylint doesn't understand this. Therefore,we silence this warning.
The patch does a few other cleanups.
Signed-off-by: Iustin Pop <iustin@google.com>...
Add targeted pylint disables
This patch should have only:
- pylint disables- docstring changes- whitespace changes
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Remove many 'Unused variable' warnings
Note there are some cases left which need extra cleanup.
Fix use of the logging functions
The logging functions expand the arguments themselves, thus it's saferto let them do it rather than manual string formatting.
Also re-wraps one comment.
ClusterMasterQuery: add primary ip field
By allowing also the primary ip field to be fetched directly, we avoidone more confd lookup, or dns request, to find out which address themaster node lives at.
Signed-off-by: Guido Trotter <ultrotter@google.com>
confd ClusterMasterQuery: allow fields request
Change the ClusterMasterQuery to allow a query, and if present accept alist of fields to be returned. Currently only name and ip are accepted.
This feature will be used by NLD to route the cluster ip over the nbma....
Epydoc fixes
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
InstanceIpToNodePrimaryIpQuery: use a query dict
In 95b487b we changed InstanceIpToNodePrimaryIpQuery to be able to querymultiple instances at once. We also need to be able to query ipsbelonging to a specific nic link, so what we do is:
1) Move the "query" argument to a dict, containing different fields...
SimpleConfigReader: ips are partitioned by link
We were already half-doing it, but this completes the process.
1) We don't maintain a list of ips or an ip->instance map2) We add a new link,ip->instance map (link->ips list we had)3) We add the link parameter to GetInstanceByIp (making it...
confd: query the pnode of multiple instances at once
Signed-off-by: Flavio Silvestrow <flaviops@google.com>Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Extend confd instances ips query
The query now accepts a link parameter.
Signed-off-by: Luca Bigliardi <shammash@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Confd: add instances IPs query
Extend confd to answer queries about instances IPs.
Signed-off-by: Luca Bigliardi <shammash@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Confd: add primary IPs queries
Extend confd to answer queries about nodes primary IPs and master candidatesprimary IPs.
Signed-off-by: Luca Bigliardi <shammash@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Wrap lines over 80 characters
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Luca Bigliardi <shammash@google.com>
A few style fixes
confd: add cluster master query
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
confd/querylib: fix docstrings
They were cut&paste from the first example queries, rather thandocumenting the current ones.
InstanceIpToNodePrimaryIpQuery
This implements CONFD_REQ_NODE_PIP_BY_INSTANCE_IP, and maps instance ipsto primary node ips.
querylib: abstract a couple of common errors
Rather than composing them every time, we'll keep "ready-made" tuplesfor unknown entries and internal errors (which is, yet, unused)
Add NodeRoleQuery
This implements CONFD_REQ_NODE_ROLE_BYNAME.
Implement confd queries
We'll start with a simple ping query, which returns ok if it gets noquery argument, and an error if it gets any. Also non-implemented queryare handled by the base ConfdQuery class, so we don't have tospecial-case them in ConfdProcessor anymore....