Change in vdsm[master]: executor: Set worker system name

danken at redhat.com danken at redhat.com
Thu Jul 30 07:42:11 UTC 2015


Dan Kenigsberg has submitted this change and it was merged.

Change subject: executor: Set worker system name
......................................................................


executor: Set worker system name

Previously we used to rename the workers using long name such as
"periodic-executor-worker-3". These names are too long for setting
thread system name (using pthread.setname()), and little too long in
general.

Since we managed worker ids in the Worker class, when creating multiple
executors, workers ids did not much the number of workers in the
executor.

This patch changes the naming scheme to "executor-name/<worker-id>",
similar to the way kernel threads are named.

For example, when creating executor named "periodic" with 4 workers, the
workers will use these names:

    periodic/0
    periodic/1
    periodic/2
    periodic/3

If we create another executor such as "jsonrpc", it will create these
worker names:

    jsonrpc/0
    jsonrpc/1
    jsonrpc/2
    jsonrpc/3
    jsonrpc/4
    jsonrpc/5
    jsonrpc/6
    jsonrpc/7

If the executor name is too long, the system thread name will be
truncated, as system thread names are limited to 15 characters.

Change-Id: Ia6a6b289daff2456213615355d6d6b51fd04b500
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/43788
Reviewed-by: Francesco Romani <fromani at redhat.com>
Reviewed-by: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Continuous-Integration: Jenkins CI
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/executor.py
M tests/executorTests.py
2 files changed, 50 insertions(+), 5 deletions(-)

Approvals:
  Piotr Kliczewski: Looks good to me, but someone else must approve
  Nir Soffer: Verified
  Jenkins CI: Passed CI tests
  Dan Kenigsberg: Looks good to me, approved
  Francesco Romani: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/43788
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6a6b289daff2456213615355d6d6b51fd04b500
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list