You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "haosdent (JIRA)" <ji...@apache.org> on 2016/02/17 17:41:18 UTC

[jira] [Updated] (MESOS-4693) Variable shadowing in HookManager::slavePreLaunchDockerHook

     [ https://issues.apache.org/jira/browse/MESOS-4693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

haosdent updated MESOS-4693:
----------------------------
    Description: 
It looks like the {{name}} parameter in {{HookManager::slavePreLaunchDockerHook}} is shadowed by the hook name defined in the {{foreach (const string& name, availableHooks.keys())}}.

Due to this, the hook receives its own name as a parameter instead of the container name. It seems to be the only method of HookManager affected by this shadowing.

See: https://github.com/apache/mesos/blob/0.27.0/src/hook/manager.cpp#L203

If that's really a bug, I'd be happy to submit a patch.

  was:
It looks like the `name` parameter in `HookManager::slavePreLaunchDockerHook` is shadowed by the hook name defined in the `foreach (const string& name, availableHooks.keys())`.

Due to this, the hook receives its own name as a parameter instead of the container name. It seems to be the only method of HookManager affected by this shadowing.

See: https://github.com/apache/mesos/blob/0.27.0/src/hook/manager.cpp#L203

If that's really a bug, I'd be happy to submit a patch.


> Variable shadowing in HookManager::slavePreLaunchDockerHook
> -----------------------------------------------------------
>
>                 Key: MESOS-4693
>                 URL: https://issues.apache.org/jira/browse/MESOS-4693
>             Project: Mesos
>          Issue Type: Bug
>          Components: modules
>    Affects Versions: 0.27.0
>            Reporter: Kevin Devroede
>
> It looks like the {{name}} parameter in {{HookManager::slavePreLaunchDockerHook}} is shadowed by the hook name defined in the {{foreach (const string& name, availableHooks.keys())}}.
> Due to this, the hook receives its own name as a parameter instead of the container name. It seems to be the only method of HookManager affected by this shadowing.
> See: https://github.com/apache/mesos/blob/0.27.0/src/hook/manager.cpp#L203
> If that's really a bug, I'd be happy to submit a patch.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)