LGTM, thanks

On Tue, Oct 7, 2014 at 5:25 PM, 'Petr Pudlak' via ganeti-devel <
[email protected]> wrote:

> commit a45e415640a380d290b3228d00e2e595f6a7469e
> Merge: c57cdce 59acce3
> Author: Petr Pudlak <[email protected]>
> Date:   Tue Oct 7 15:05:46 2014 +0200
>
>     Merge branch 'stable-2.11' into stable-2.12
>
>     * stable-2.10
>       ganeti.daemon: fix daemon mode with GnuTLS >= 3.3
>       Fix DRBD version check for non VM capable nodes
>       Fix invalid message from gnt-os
>       Renaming NV_VMNODES to NV_NONVMNODES
>       Node names in NV_VMNODES
>
>     * stable-2.9
>       Ganeti.Daemon: always install SIGHUP handler
>
>     Conflicts:
>         lib/config.py: Replace 2.11 annotations with 2.12 annotations
>
>     Signed-off-by: Petr Pudlak <[email protected]>
>
> diff --cc lib/config.py
> index 6f171da,b6f1373..1e335f3
> --- a/lib/config.py
> +++ b/lib/config.py
> @@@ -2403,16 -2056,25 +2403,25 @@@ class ConfigWriter(object)
>                    for node in self._UnlockedGetNodeList()]
>       return [node.uuid for node in all_nodes if node.vm_capable]
>
>  -  @locking.ssynchronized(_config_lock, shared=1)
>  +  @_ConfigSync(shared=1)
>     def GetNonVmCapableNodeList(self):
> -     """Return the list of nodes which are not vm capable.
> +     """Return the list of nodes' uuids which are not vm capable.
>
>       """
>       all_nodes = [self._UnlockedGetNodeInfo(node)
>                    for node in self._UnlockedGetNodeList()]
>       return [node.uuid for node in all_nodes if not node.vm_capable]
>
>  -  @locking.ssynchronized(_config_lock, shared=1)
>  +  @_ConfigSync(shared=1)
> +   def GetNonVmCapableNodeNameList(self):
> +     """Return the list of nodes' names which are not vm capable.
> +
> +     """
> +     all_nodes = [self._UnlockedGetNodeInfo(node)
> +                  for node in self._UnlockedGetNodeList()]
> +     return [node.name for node in all_nodes if not node.vm_capable]
> +
>  -  @locking.ssynchronized(_config_lock, shared=1)
> ++  @_ConfigSync(shared=1)
>     def GetMultiNodeInfo(self, node_uuids):
>       """Get the configuration of multiple nodes.
>
> diff --cc lib/daemon.py
> index 385807d,a276c52..cff0d84
> --- a/lib/daemon.py
> +++ b/lib/daemon.py
> @@@ -814,12 -809,24 +814,28 @@@ def GenericMain(daemon_name, optionpars
>
>     log_filename = constants.DAEMONS_LOGFILES[daemon_name]
>
>  +  # node-daemon logging in lib/http/server.py, _HandleServerRequestInner
>  +  if options.debug and warn_breach:
>  +    sys.stderr.write(constants.DEBUG_MODE_CONFIDENTIALITY_WARNING %
> daemon_name)
>  +
>     if options.fork:
> -     utils.CloseFDs()
> +     # Newer GnuTLS versions (>= 3.3.0) use a library constructor for
> +     # initialization and open /dev/urandom on library load time, way
> before we
> +     # fork(). Closing /dev/urandom causes subsequent ganeti.http.client
> +     # requests to fail and the process to receive a SIGABRT. As we cannot
> +     # reliably detect GnuTLS's socket, we work our way around this by
> keeping
> +     # all fds referring to /dev/urandom open.
> +     noclose_fds = []
> +     for fd in os.listdir("/proc/self/fd"):
> +       try:
> +         if os.readlink(os.path.join("/proc/self/fd", fd)) ==
> "/dev/urandom":
> +           noclose_fds.append(int(fd))
> +       except EnvironmentError:
> +         # The fd might have disappeared (although it shouldn't as we're
> running
> +         # single-threaded).
> +         continue
> +
> +     utils.CloseFDs(noclose_fds=noclose_fds)
>       (wpipe, stdio_reopen_fn) = utils.Daemonize(logfile=log_filename)
>     else:
>       (wpipe, stdio_reopen_fn) = (None, None)
>



-- 
Helga Velroyen | Software Engineer | [email protected] |

Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores

Reply via email to