-
Notifications
You must be signed in to change notification settings - Fork 472
Background worker fails after enabling security scanning #1743
Comments
In order to fetch vulnerabilities, the security scanner first has to gather the layers to be inspected. In our case, we fetch this information from the image manifest as given by the Registry. This commit adds some code so the fetching of this manifest is safer. For example, it will not freak out if a timeout was reached when requesting the manifest from the registry. Fixes SUSE#1743 Signed-off-by: Miquel Sabaté Solà <[email protected]>
From the stack trace I gather that this can happen when there is a problem while fetching a manifest from the registry (e.g. it doesn't exist anymore, a timeout was reached, etc.). I've opened #1768 to address this situation. Once it's merged, I'll update the Thanks a lot for reporting 👏 (and sorry for the delay, I came back from vacations on Tuesday and I was still catching up 😁) |
In order to fetch vulnerabilities, the security scanner first has to gather the layers to be inspected. In our case, we fetch this information from the image manifest as given by the Registry. This commit adds some code so the fetching of this manifest is safer. For example, it will not freak out if a timeout was reached when requesting the manifest from the registry. Fixes #1743 Signed-off-by: Miquel Sabaté Solà <[email protected]>
@kkoppel the code is already in the |
Thanks, @mssola ! |
In order to fetch vulnerabilities, the security scanner first has to gather the layers to be inspected. In our case, we fetch this information from the image manifest as given by the Registry. This commit adds some code so the fetching of this manifest is safer. For example, it will not freak out if a timeout was reached when requesting the manifest from the registry. Fixes SUSE#1743 Signed-off-by: Miquel Sabaté Solà <[email protected]>
Description
My Portus background worker started to fail after enabling security scanning with Clair v2.0.2.
Steps to reproduce
I recently set up Portus to work with an existing private registry installation with about 50 repositories. The existing Docker images got imported and everything seemed to work fine.
I then enabled security scanning via Clair by setting the following environment variables:
PORTUS_SECURITY_CLAIR_SERVER
PORTUS_SECURITY_CLAIR_HEALTH_PORT
After restarting both the main Portus instance and the background worker, I get the following from the background worker:
If I restart the background worker, then the same thing happens again after some seconds. I see a bunch of requests being handled by Clair when the background worker starts and all of them get 200 or 201 responses.
Deployment information
Portus is running in Docker containers and the whole setup is based on the secure Docker compose example.
Configuration:
Portus version: 2.3.1@a4ca664b9c30c7a464296297d1868ba301d791cf
The text was updated successfully, but these errors were encountered: