Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
GH-793 (#796)
Browse files Browse the repository at this point in the history
Signed-off-by: Will Johnson <[email protected]>
  • Loading branch information
johnsonw authored and jgrund committed Jan 30, 2019
1 parent ab248cc commit b6867d8
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,14 @@ def create_action_record(model_name, state, host_id):
# not the case the user would need to manually do it in the gui.
# Most other state like mcastport will be read by the agents.
for host_id, in table_rows:
for model_name, state in [('corosyncconfiguration', 'started'),
('ntpconfiguration', 'configured'),
ct, _ = orm['contenttypes.ContentType'].objects.get_or_create(model='corosyncconfiguration',
app_label='chroma_core',
defaults=dict(name='corosyncconfiguration'))

db.execute("insert into chroma_core_corosyncconfiguration (state_modified_at, state, immutable_state, content_type_id, host_id, corosync_reported_up) "
"values ('%s', 'started', 'f', %s, %s, 'f')" % (datetime.datetime.now(), ct.id, host_id))

for model_name, state in [('ntpconfiguration', 'configured'),
('pacemakerconfiguration', 'started')]:
create_action_record(model_name, state, host_id)

Expand Down

0 comments on commit b6867d8

Please sign in to comment.