[Notes] [Git][BuildStream/buildstream][danielsilverstone-ct/maybe-reduce-fd-leaks] 3 commits: Improve documentation for artifact cache installation



Title: GitLab

Tristan Maat pushed to branch danielsilverstone-ct/maybe-reduce-fd-leaks at BuildStream / buildstream

Commits:

2 changed files:

Changes:

  • buildstream/_scheduler/jobs/job.py
    ... ... @@ -109,7 +109,7 @@ class Job():
    109 109
             # Private members
    
    110 110
             #
    
    111 111
             self._scheduler = scheduler            # The scheduler
    
    112
    -        self._queue = multiprocessing.Queue()  # A message passing queue
    
    112
    +        self._queue = None                     # A message passing queue
    
    113 113
             self._process = None                   # The Process object
    
    114 114
             self._watcher = None                   # Child process watcher
    
    115 115
             self._listening = False                # Whether the parent is currently listening
    
    ... ... @@ -130,6 +130,8 @@ class Job():
    130 130
         #
    
    131 131
         def spawn(self):
    
    132 132
     
    
    133
    +        self._queue = multiprocessing.Queue()
    
    134
    +
    
    133 135
             self._tries += 1
    
    134 136
             self._parent_start_listening()
    
    135 137
     
    
    ... ... @@ -552,6 +554,9 @@ class Job():
    552 554
             self.parent_complete(returncode == RC_OK, self._result)
    
    553 555
             self._scheduler.job_completed(self, returncode == RC_OK)
    
    554 556
     
    
    557
    +        # Force the deletion of the queue and process objects to try and clean up FDs
    
    558
    +        self._queue = self._process = None
    
    559
    +
    
    555 560
         # _parent_process_envelope()
    
    556 561
         #
    
    557 562
         # Processes a message Envelope deserialized form the message queue.
    

  • doc/source/install_artifacts.rst
    ... ... @@ -161,13 +161,13 @@ Below are two examples of how to run the cache server as a systemd service, one
    161 161
     
    
    162 162
        [Service]
    
    163 163
        Environment="LC_ALL=C.UTF-8"
    
    164
    -   ExecStart=/usr/local/bin/bst-artifact-server --port 11001 --server-key {{certs_path}}/privkey.pem --
    
    165
    -   server-cert {{certs_path}}/fullchain.pem {{artifacts_path}}
    
    164
    +   ExecStart=/usr/local/bin/bst-artifact-server --port 11001 --server-key {{certs_path}}/server.key --server-cert {{certs_path}}/server.crt {{artifacts_path}}
    
    166 165
        User=artifacts
    
    167 166
     
    
    168 167
        [Install]
    
    169 168
        WantedBy=multi-user.target
    
    170 169
     
    
    170
    +.. code:: ini
    
    171 171
     
    
    172 172
        #
    
    173 173
        # Pull/Push
    
    ... ... @@ -178,9 +178,7 @@ Below are two examples of how to run the cache server as a systemd service, one
    178 178
     
    
    179 179
        [Service]
    
    180 180
        Environment="LC_ALL=C.UTF-8"
    
    181
    -   ExecStart=/usr/local/bin/bst-artifact-server --port 11002 --server-key {{certs_path}}/privkey.pem --
    
    182
    -   server-cert {{certs_path}}/fullchain.pem --client-certs /home/artifacts/authorized.crt --enable-push /
    
    183
    -   {{artifacts_path}}
    
    181
    +   ExecStart=/usr/local/bin/bst-artifact-server --port 11002 --server-key {{certs_path}}/server.key --server-cert {{certs_path}}/server.crt --client-certs {{certs_path}}/authorized.crt --enable-push {{artifacts_path}}
    
    184 182
        User=artifacts
    
    185 183
     
    
    186 184
        [Install]
    
    ... ... @@ -188,11 +186,16 @@ Below are two examples of how to run the cache server as a systemd service, one
    188 186
     
    
    189 187
     Here we define when systemd should start the service, which is after the networking stack has been started, we then define how to run the cache with the desired configuration, under the artifacts user. The {{ }} are there to denote where you should change these files to point to your desired locations.
    
    190 188
     
    
    189
    +For more information on systemd services see: 
    
    190
    +`Creating Systemd Service Files <https://www.devdungeon.com/content/creating-systemd-service-files>`_.
    
    191
    +
    
    191 192
     User configuration
    
    192 193
     ~~~~~~~~~~~~~~~~~~
    
    193 194
     The user configuration for artifacts is documented with the rest
    
    194 195
     of the :ref:`user configuration documentation <user_config>`.
    
    195 196
     
    
    197
    +Note that for self-signed certificates, the public key fields are mandatory.
    
    198
    +
    
    196 199
     Assuming you have the same setup used in this document, and that your
    
    197 200
     host is reachable on the internet as ``artifacts.com`` (for example),
    
    198 201
     then a user can use the following user configuration:
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]