Page MenuHomeDevCentral

Use /usr/local/share/{tc2,viperserv} for viperserv accounts
ClosedPublic

Authored by dereckson on Mar 1 2018, 00:36.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 23:08
Unknown Object (File)
Wed, Nov 20, 01:37
Unknown Object (File)
Wed, Nov 20, 01:16
Unknown Object (File)
Mon, Nov 18, 10:02
Unknown Object (File)
Sun, Nov 17, 18:07
Unknown Object (File)
Sun, Nov 10, 15:26
Unknown Object (File)
Thu, Oct 31, 12:25
Unknown Object (File)
Oct 26 2024, 02:22
Subscribers

Details

Summary

Currently, the viperserv accounts uses /var/run/<account>.
On FreeBSD, non socket files in /var/run folders are deleted on boot.

This change switches the folder to a more stable path.

/var/run/<account> folders will so only host pid files.

Thanks @amj for the share folder suggestion.

Fixes T1350.

Test Plan

Run on Ysul.

Diff Detail

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

Event Timeline

dereckson created this revision.
Temporary fix pending reboot for Daeghrefn
proc get_external_script {script} {
    set path /usr/local/share/viperserv/bin/
    append path $script
}

e.g. .tcl get_external_script create_surname gives /usr/local/share/viperserv/bin/create_surname.

Ysul
$ salt-call --local state.apply roles/viperserv/account
[...]
          ID: viperserv_account_viperserv                                                                                                                      
    Function: user.present                                                                                                                                     
        Name: viperserv                                                                                                                                        
      Result: True                                                                                                                                             
     Comment: Updated user viperserv
     Started: 00:39:37.083526                                     
    Duration: 806.041 ms
     Changes:   
              ----------     
              home:  
                  /usr/local/share/viperserv    
[...]
----------                                                                                                  
          ID: viperserv_account_tc2
    Function: user.present                          
        Name: tc2                                   
      Result: True
     Comment: Updated user tc2                              
     Started: 00:39:37.927008                                     
    Duration: 613.963 ms
     Changes:                                   
              ----------
              home:              
                  /usr/local/share/tc2
[...]

$ salt-call --local state.apply roles/viperserv/wikidata-access-layer/code
[...]
----------
          ID: /usr/local/share/viperserv/bin
    Function: file.directory
      Result: True
     Comment: Directory /usr/local/share/viperserv/bin updated
     Started: 00:41:39.699377
    Duration: 11.464 ms
     Changes:   
              ----------
              /usr/local/share/viperserv/bin:
                  New Dir
----------
          ID: /usr/local/share/viperserv/bin/create_given_name
    Function: file.symlink
      Result: True
     Comment: Created new symlink /usr/local/share/viperserv/bin/create_given_name -> /srv/wikidata-access-layer/create_given_name
     Started: 00:41:39.711354
    Duration: 169.054 ms
     Changes:   
              ----------
              new:
                  /usr/local/share/viperserv/bin/create_given_name
----------
          ID: /usr/local/share/viperserv/bin/create_surname
    Function: file.symlink
      Result: True
     Comment: Created new symlink /usr/local/share/viperserv/bin/create_surname -> /srv/wikidata-access-layer/create_surname
     Started: 00:41:39.889714
    Duration: 166.637 ms
     Changes:   
              ----------
              new:
                  /usr/local/share/viperserv/bin/create_surname

Summary for local
------------
Succeeded: 5 (changed=3)
Failed:    0
------------
Total states run:     5
Total run time:   3.481 s
This revision is now accepted and ready to land.Mar 1 2018, 00:48
This revision was automatically updated to reflect the committed changes.