Page MenuHomeDevCentral

Create Odderon systemd unit
ClosedPublic

Authored by Sandlayth on Jan 25 2017, 23:16.
Tags
None
Referenced Files
F3745528: D864.diff
Fri, Nov 15, 15:38
Unknown Object (File)
Sat, Nov 9, 22:38
Unknown Object (File)
Sat, Nov 9, 14:40
Unknown Object (File)
Mon, Nov 4, 07:29
Unknown Object (File)
Fri, Nov 1, 02:49
Unknown Object (File)
Sun, Oct 20, 15:07
Unknown Object (File)
Sun, Oct 20, 05:44
Unknown Object (File)
Oct 16 2024, 00:13
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 1336
Build 1584: 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.