Page MenuHomeDevCentral

Create Odderon systemd unit
ClosedPublic

Authored by Sandlayth on Jan 25 2017, 23:16.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 23:22
Unknown Object (File)
Thu, Dec 12, 23:21
Unknown Object (File)
Mon, Dec 9, 18:41
Unknown Object (File)
Mon, Dec 9, 01:18
Unknown Object (File)
Sun, Dec 8, 23:57
Unknown Object (File)
Wed, Dec 4, 01:49
Unknown Object (File)
Tue, Dec 3, 17:22
Unknown Object (File)
Mon, Dec 2, 09:47
Subscribers
None

Details

Summary

Salt and systemd units created.

Ref T1129

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
No Lint Coverage
Unit
No Test Coverage
Branch
arcpatch-D864
Build Status
Buildable 1334
Build 1582: arc lint + arc unit

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.