Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to execute a command on hosts (physical machines) via OpenStack code?

I am trying to modify/add some OpenStack code to implement such functionality: after users click one button on web page, some command will be executed on the specified host (e.g. one compute node). One user scenario is, enable KSM kernel feature on one specified host. All need to do is to execute "echo 1 > /sys/kernel/mm/ksm/run", then KSM kernel feature will be enabled. Now I can get the IP of the host (one compute node), but how to execute the above command by leveraging OpenStack code? (I checked all the Nova APIs. It seems there is no such Nova API to execute a command on a host. Also, I checked all the Ironic APIs. The same result.)