Do I need to restart all st2 services when I update a pack or can I just run `st2ctl reload`?

(Daniel Jay Haskin) #1

If my pack has sensor changes, action changes, etc. is a st2ctl restart recommended or can I just run st2ctl reload? Are there any circumstances under which I would need to restart.

(Eugen C.) #2

You don’t need st2ctl restart after updating a pack.

Reloading content from disk to DB depends on mechanics of pack update you do.

  1. If you run st2 pack install <pack_name> to install updated/new version of a pack, - it already handles register content.
  2. If you change pack content manually, you can do granular st2 pack register <pack_name> and it’ll pick up changes for this specific pack.

st2ctl reload is too much as it reloads content for all packs in the system which might be excessive.

1 Like
(Daniel Jay Haskin) #3

What about changes to polling sensor classes? these get reloaded by the sensorcontainer, then?

(Daniel Jay Haskin) #4

Ah, I see that these changes do get picked up in the sensorcontainer logs:

2019-05-10 19:15:55,702 139873095190800 INFO manager [-] Sensor isteo_vmp.ServiceNowSensor updated. Reloading sensor.
2019-05-10 19:15:56,723 139873095190800 INFO manager [-] Sensor isteo_vmp.ServiceNowSensor reloaded.


(Eugen C.) #5

Yes, exactly.
Sensors are auto-reloaded to pick up updated py code.