Page MenuHomeDevCentral

Create Odderon systemd unit
ClosedPublic

Authored by Sandlayth on Jan 25 2017, 23:16.
Tags
None
Referenced Files
F2843778: D864.diff
Tue, Apr 23, 08:58
F2840597: D864.id2200.diff
Mon, Apr 22, 20:47
F2840512: D864.id2201.diff
Mon, Apr 22, 20:30
F2840469: D864.id2197.diff
Mon, Apr 22, 20:24
F2839832: D864.diff
Mon, Apr 22, 17:36
Unknown Object (File)
Sun, Apr 21, 09:57
Unknown Object (File)
Fri, Apr 19, 01:14
Unknown Object (File)
Fri, Apr 19, 00:33
Subscribers
None

Details

Summary

Salt and systemd units created.

Ref T1129

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson requested changes to this revision.Jan 25 2017, 23:23
dereckson added inline comments.
roles/shellserver/odderon/files/odderon.service
10

Absolute path should be used.

roles/shellserver/odderon/service.sls
14

some funny spaces

Other files use two spaces for a level of indent.

20

It will belong to the odderon_unit block if there is no whiteline.

Currently, it defines a NEW "module.run" state.

This revision now requires changes to proceed.Jan 25 2017, 23:23
dereckson retitled this revision from Creating Odderon systemd unit to Create Odderon systemd unit.Jan 25 2017, 23:49
dereckson edited the summary of this revision. (Show Details)
Sandlayth edited edge metadata.

Remove extra spaces and set full path instead of relative

Tweak unit with Odderon paths.

Tabs to spaces in unit, fix module names.

Salt master
$ cd /opt/nasqueron-operations
$ arc patch D864
$ salt eglide state.apply roles/shellserver/odderon/
[...]
eglide:
----------
          ID: odderon_unit
    Function: file.managed
        Name: /etc/systemd/system/odderon.service
      Result: True
     Comment: File /etc/systemd/system/odderon.service updated
     Started: 10:32:37.848059
    Duration: 860.07 ms
     Changes:   
              ----------
              diff:
                  New file
              mode:
                  0644
----------
          ID: odderon_unit
    Function: module.run
        Name: systemd.force_reload
      Result: False
     Comment: Module function systemd.force_reload is not available
     Started: 10:32:38.714582
    Duration: 4031.428 ms
     Changes:   
----------
          ID: odderon_running
    Function: service.running
        Name: odderon
      Result: False
     Comment: One or more requisite failed: roles/shellserver/odderon/.service.odderon_unit
     Changes:
[...]

Works now when the unit file is present:

Salt master
$ salt eglide state.apply roles/shellserver/odderon/service
eglide:
----------
          ID: odderon_unit
    Function: file.managed
        Name: /etc/systemd/system/odderon.service
      Result: True
     Comment: File /etc/systemd/system/odderon.service is in the correct state
     Started: 10:41:51.011989
    Duration: 589.945 ms
     Changes:   
----------
          ID: odderon_unit
    Function: module.run
        Name: service.force_reload
      Result: True
     Comment: State was not run because none of the onchanges reqs changed
     Changes:   
----------
          ID: odderon_running
    Function: service.running
        Name: odderon
      Result: True
     Comment: Started Service odderon
     Started: 10:41:54.488019
    Duration: 665.829 ms
     Changes:   
              ----------
              odderon:
                  True

Summary for eglide
------------
Succeeded: 3 (changed=1)
Failed:    0
------------
Total states run:     3
Total run time:   1.256 s
Eglide
$ rm  /etc/systemd/system/odderon.service
Salt master
$ salt eglide state.apply roles/shellserver/odderon/service
eglide:
----------
          ID: odderon_unit
    Function: file.managed
        Name: /etc/systemd/system/odderon.service
      Result: True
     Comment: File /etc/systemd/system/odderon.service updated
     Started: 10:44:31.869275
    Duration: 600.322 ms
     Changes:   
              ----------
              diff:
                  New file
              mode:
                  0644
----------
          ID: odderon_unit
    Function: module.run
        Name: service.force_reload
      Result: True
     Comment: Module function service.force_reload executed
     Started: 10:44:32.475086
    Duration: 94462.909 ms
     Changes:   
              ----------
              ret:
                  True
----------
          ID: odderon_running
    Function: service.running
        Name: odderon
      Result: True
     Comment: Service restarted
     Started: 10:46:07.201732
    Duration: 299.625 ms
     Changes:   
              ----------
              odderon:
                  True

Summary for eglide
------------
Succeeded: 3 (changed=3)
Failed:    0
------------
Total states run:     3
Total run time:  95.363 s

Bot successfully restarted.

This revision is now accepted and ready to land.Jan 26 2017, 10:47
This revision was automatically updated to reflect the committed changes.