Failed to create snap, snap command failed - linux

I am trying to build a snap and i have used flutter for building the app. while creating the snap package i am getting an error.
Staging flutter-extension
+ snapcraftctl stage
Staging gnome-3-28-extension
+ snapcraftctl stage
Staging system-information
+ snapcraftctl stage
Priming flutter-extension
+ snapcraftctl prime
Priming gnome-3-28-extension
+ snapcraftctl prime
Priming system-information
+ snapcraftctl prime
The command 'system_information' for 'system_information' was resolved to 'bin/system_information'.
The command 'system_information' has been changed to 'bin/system_information'.
Snapping |
Failed to create snap, snap command failed:
stdout:
stderr:
error: cannot pack "/root/prime": mksquashfs call failed: Could not create destination file: Operation not permitted
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]: no
snapcraft-system-information #
I have tried snapcraft clean already but it didn't cleared the issue.

Delete build directory and build again.
follow this github link for detail
https://github.com/EOSIO/eos/issues/4885

Actually the error is generating from multipass which i used to build my snap packages. I tried deleting /build and building again but it didn't worked.
I found an alternate way to build snaps using lxd

Related

Can't deploy Docker container to Azure registry from VSCode

I'm trying to follow the steps in this tutorial: https://learn.microsoft.com/en-us/azure/container-apps/deploy-visual-studio-code
I've got the plugins setup in VSCode and the sample code cloned to my machine. However, when I right-click on the Dockerfile and select "Build Image in Azure", I'm unable to get it to complete. There's no error, the deployment just seemingly hangs, this is the only output I get:
The Docker extension will try to connect to 'unix:///var/run/docker.sock', via context 'default'.
Setting up temp file with 'sourceArchive89321.tar.gz'
Sending source code to temp file
Getting build source upload URL
Creating block blob
Uploaded source code to /var/folders/bn/t9ncw2gx1fxc_2c8h2wb22940000gn/T/sourceArchive89321.tar.gz
Set up run request
Scheduled run ca9
2022/11/02 02:34:13 Downloading source code...
2022/11/02 02:34:14 Finished downloading source code
2022/11/02 02:34:13 Downloading source code...
2022/11/02 02:34:14 Finished downloading source code
2:34:15 Setting up Docker configuration...
2022/11/02 02:34:15 Successfully set up Docker configuration
2022/11/02 02:34:15 Logging in to registry: inhearten.azurecr.io
2022/11/02 02:34:16 Successfully logged into inhearten.azurecr.io
2022/11/02 02:34:16 Executing step ID: build. Timeout(sec): 28800, Working directory: '', Network: ''
2022/11/02 02:34:16 Scanning for dependencies...
2022/11/02 02:34:17 Successfully scanned dependencies
2022/11/02 02:34:17 Launching container with name: build
Sending build context to Docker daemon 173.6kB
Step 1/10 : FROM node:lts-alpine
lts-alpine: Pulling from library/node
213ec9aee27d: Already exists
9653b84b6e0f: Pulling fs layer
78c6f799e789: Pulling fs layer
d64061ca841e: Pulling fs layer
d64061ca841e: Verifying Checksum
d64061ca841e: Download complete
78c6f799e789: Verifying Checksum
78c6f799e789: Download complete
9653b84b6e0f: Verifying Checksum
9653b84b6e0f: Download complete
9653b84b6e0f: Pull complete
And it just stays at that final step infinitely, and the image never shows up in the Azure docker registry I specified.
What I tried:
Deploying the docker image to azure
What I expected:
It to successfully deploy
What happened:
It's stuck on Step 1/10 with no error message or obvious way to proceed
I tried to reproduce the same issue in my environment and got the below results
I have VS code setup in my local and installed the docker setup
Cloning the sample URL Using this document
git clone https://github.com/Azure-Samples/containerapps-albumapi-javascript.git
Signed into the azure and followed the same steps which mention in the document
In the explorer window, open the docker file which we have cloned and right click on the Dockerfile and click on Build image
While creating the build give the registry name which we have to mention and click on enter it will create the build as shown in below
The docker image got success fully deployed
Now we can see the newly created images by using the below command
docker images
NOTE:
1). We are getting these type of errors because of source code not cloned properly for that delete the entire source code and re-clone it again
2). please check the versions try to install the latest versions

GitLab - Error 404 on artifact upload for large artifacts

I am self-hosting a private Gitlab 15.0.2 on Gentoo using this overlay: https://gitlab.awesome-it.de/overlays/gitlab
It's basically an installation from source (no Omnibus). Now I have also configured a gitlab runner (docker based) and a CI pipeline in one of my projects (a homepage being generated through hugo). The pipeline works fine up the the point where it is supposed to upload the artifact which is currently about 11GB in size.
Initially this gave me an "413 Request Entity Too Large" error, so I raised the artifact size limits in Gitlab and increased the client_max_body_size in Nginx. Now I am seeing this error instead:
Uploading artifacts for successful job
Using docker image sha256:c20c992e5d83348903a6f8d18b4005ed1db893c4f97a61e1cd7a8a06c2989c40 for registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:x86_64-latest with digest registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper#sha256:edc1bf6ab9e1c7048d054b270f79919eabcbb9cf052b3e5d6f29c886c842bfed ...
Uploading artifacts...
public: found 907 matching files and directories
WARNING: Uploading artifacts as "archive" to coordinator... 404 Not Found id=112 responseStatus=404 Not Found status=404 token=X8QjapaV
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "archive" to coordinator... 404 Not Found id=112 responseStatus=404 Not Found status=404 token=X8QjapaV
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "archive" to coordinator... 404 Not Found id=112 responseStatus=404 Not Found status=404 token=X8QjapaV
FATAL: invalid argument
ERROR: Job failed: exit code 1
It tries 3 times before eventually giving up. Each attempt takes a few minutes.
I am not seeing any messages related to this in Gitlab's production.log which leaves me a bit stumped. The 404 error code does not seem to make much sense in this context. I have tested the build pipeline by branching and removing lots of content to create a much smaller artifact. The upload works in that branch on first try, so the upload URL must be fine.
Are there any other configuration settings that I need to be aware of? Perhaps some timeout for the upload?
EDIT:
Here's my current .gitlab-ci.yaml to give you better idea of what I am doing. It's rather ugly with those NodeJS dependencies being installed every time the pipeline is run, but that's currently not the issue.
image: cibuilds/hugo
variables:
GIT_SUBMODULE_STRATEGY: recursive
build:
stage: build
script:
- curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
- sudo bash /tmp/nodesource_setup.sh
- sudo apt update
- sudo apt install nodejs
- npm install autoprefixer postcss-cli
- hugo
artifacts:
paths:
- public
I am planning to add another step to the pipeline for the deployment using rsync over ssh.

Unable to use mcr.microsoft.com/windows/servercore:ltsc when building from azure cloudshell (powershell)

This works perfectly when I build locally, but to avoid having to move images to the azure container registry I am trying to build in the cloud.
Dockerfile contains:
FROM mcr.microsoft.com/windows/servercore:ltsc AS build-stage1
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
.
.
.
Step 5/37 : FROM mcr.microsoft.com/windows/servercore:ltsc AS build-stage1
manifest for mcr.microsoft.com/windows/servercore:ltsc not found: manifest unknown: manifest unknown
2019/10/01 14:32:28 Container failed during run: build. No retries remaining.
failed to run step ID: build: exit status 1
Run ID: ch1k failed after 7s. Error: failed during run, err: exit status 1
And yet the same base image works fine when I build from a locally hosted powershell.
I'm not clear how do you build the image successfully. But I recommend you take a look at the image mcr.microsoft.com/windows/servercore in the docker hub. And it also gives out the available tags here. There is no tag as ltsc. You need to choose one in the available tags. For example, mcr.microsoft.com/windows/servercore:ltsc2019.
Update:
I can reproduce the same issue as you got, then I add the parameter --platform windows and it works perfectly. I recommend you take a try. Hope it helps.

Could not build Docker image WindowsServerCodre on Azure DevOps

I'm trying to build some Windows docker images on Azure Devops. However, during the last step I get:
re-exec error: exit status 1: output: time="2018-10-29T14:26:32Z" level=error msg="hcsshim::ImportLayer failed in Win32: The system cannot find the path specified. (0x3) layerId=\\?\C:\ProgramData\docker\windowsfilter\e5d6a8d03464d02106a603b183b1ea47ad9fdd910a7dc1fdf19f605ec343b9cb flavour=1 folder=C:\ProgramData\docker\tmp\hcs934975059"
2018-10-29T14:26:34.2133323Z hcsshim::ImportLayer failed in Win32: The system cannot find the path specified. (0x3) layerId=\?\C:\ProgramData\docker\windowsfilter\e5d6a8d03464d02106a603b183b1ea47ad9fdd910a7dc1fdf19f605ec343b9cb flavour=1 folder=C:\ProgramData\docker\tmp\hcs934975059
The weird thing is that I have the exactly same branch on my personal account and it works! It only fails for conan-io organization!
What I could do to fix it?
It's possible to check all windowsservercore here. I can't use 1709 or 1803 because of my environment.
Logs are available here:
[success] https://dev.azure.com/uilianr/conan-devops/_build/results?buildId=92&view=logs
[failing] https://dev.azure.com/conanio/conan-docker-tools/_build/results?buildId=28&view=logs
Docker recipes are here (same file on both repositories):
[uilianries] https://github.com/uilianries/conan-docker-tools/blob/feature/docker-windows/msvc_14/Dockerfile
[conan-io] https://github.com/conan-io/conan-docker-tools/blob/feature/docker-windows/msvc_14/Dockerfile

VSTS - Build a Docker Image

I have a .NET Core repo in VSTS. I'm trying to create a Build pipeline that builds a Docker image and adds it to my Azure Container Registry. My Build pipeline has a Docker task. This task has the "Build an image" action selected. This action relies on my Dockerfile, which looks like this:
FROM microsoft/dotnet:2.1.2-runtime-nanoserver-1803
# Install .NET Core
ENV DOTNET_VERSION 2.1.2
When my Build pipeline runs, I get an error that says:
failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage \\?\C:\ProgramData\docker\windowsfilter\82aba535faccd8bf0e5ce3c122247672fa671214000a12c5481972212c5e2ca0\UtilityVM: The system cannot find the path specified.
##[error]C:\Program Files\Docker\docker.exe failed with return code: 1
Why am I getting this error? How do I fix it?
It should be the same issue with this one : https://github.com/Microsoft/vsts-tasks/issues/6510
Seems it still have some issues with nanoserver-1803
Just try to setup and host a custom agent on Azure VM, then check it again.
https://github.com/Microsoft/vsts-tasks/issues/6510#issuecomment-370152300
I found maybe an explication about this error: VSTS agents seem not
support nanoserver-1709 actually. Maybe this will change with the next
version 1803.
See details here: Microsoft/vsts-agent#1393
When I setup and host a custom agent on a machine on Azure, it's
working. So it's not a bug with this task. I close this issue. Thanks!

Resources