Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Fixing vmdk-opsd gettting stopped after multiple vmdkops_admin config init/rm operation #1382

Conversation

shuklanirdesh82
Copy link
Contributor

@shuklanirdesh82 shuklanirdesh82 commented Jun 9, 2017

This PR fixes #1291

We don't need to restart vmdk_opsd when config changes since we reopen DB for each request from Docker client and thus we will pick up the change automatically.

With this PR following message from the vmdk_ops.log will be omitted too.

05/24/17 18:50:42 1386157 [MainThread] [ERROR  ] [Errno 38] Function not implemented: '/usr/lib/vmware/vmdkops/bin/vmdk_ops.py'
Traceback (most recent call last):
  File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 1706, in main
    handleVmciRequests(port)
  File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 1637, in handleVmciRequests
    c = lib.vmci_get_one_op(g_vmci_listening_socket, byref(cartel), txt, c_int(bsize))
  File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 1530, in signal_handler_restart
    os.execve(__file__, sys.argv, os.environ)

Testing Done: locally (yes)

Running unit tests in /tmp/vmdk_ops_unittest18831/vmdkops_admin_test.py...
...................................................Nothing to do - Mode=NotConfigured (no local DB, no symlink to shared DB).
Warning: this feature is EXPERIMENTAL
Creating new DB at /etc/vmware/vmdkops/auth-db
=== Service: 
Version: 0.14.ec99c85-0.0.1
Status: Running
Pid: 117748
Port: 1019
LogConfigFile: /etc/vmware/vmdkops/log_config.json
LogFile: /var/log/vmware/vmdk_ops.log
LogLevel: INFO
=== Authorization Config DB: 
DB_LocalPath: /etc/vmware/vmdkops/auth-db
DB_SharedLocation: N/A
DB_Mode: SingleNode (local DB exists)
vmgroup access set succeeded
vmgroup access set succeeded
vmgroup access set succeeded
vmgroup access set succeeded
vmgrou...
----------------------------------------------------------------------
Ran 54 tests in 110.810s

OK

Copy link
Contributor

@govint govint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the service restarted via the startup scripts then?

@msterin
Copy link
Contributor

msterin commented Jun 9, 2017

Please add a few words to the PR description and commit message
Something like we do not need to restart vmdk_opsd when config changes since we reopen DB for each request from Docker client and thus we will pick up the change automatically

@shuklanirdesh82
Copy link
Contributor Author

Thanks @govint & @msterin for the approval!

#1382 (comment)

Yeah my bad .. I will add to the commit message while merging.

@govint Please have a look at #1382 (comment) we don't need to restart service while performing config changes as executeRequest is creating db connection per thread.

@shuklanirdesh82 shuklanirdesh82 merged commit 7299e75 into vmware-archive:master Jun 9, 2017
@shuklanirdesh82 shuklanirdesh82 deleted the vmdkopsStopped.shuklanirdesh82 branch June 9, 2017 04:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vmdk_opsd does not properly restart on signal 10 (and instead throws an exception)
4 participants