HodorNV / ALOps

ALOps
59 stars 24 forks source link

Create Docker fails #599

Closed SorenKlemmensen closed 1 year ago

SorenKlemmensen commented 1 year ago

Describe the bug When running the build step "Create docker Image" it fails with //>>Log start Installation complete re-exec error: exit status 1: output: hcsshim::ImportLayer - failed failed in Win32: The system cannot find the path specified. (0x3) BcContainerHelper\New-BcImage Telemetry Correlation Id: b5b5dfaf-d0e8-4261-91d2-77aba9e01971

[error]Docker Build failed with exit code 1

Finishing: ALOPS - Create Docker Image //<<Log end

I was thinking this was caused by BcContainerHelper however creating the image with BcContainerHelper worked fine.

the used yaml please provide the yaml that you used. It helps you put the yaml like this:

        - task: ALOpsDockerCreate@1
          displayName: 'ALOPS - Create Docker Image'
          inputs:
            artifacttype: sandbox
            artifactcountry: ${{ArtifactCountry}}
            artifactversion: ${{ArtifactVersion}}

Where ArtifactCountry is BE and ArtifactVersion is 21.2

the output

your output log Start

2023-01-12T06:44:12.0037203Z ##[section]Starting: ALOPS - Create Docker Image
2023-01-12T06:44:12.0316310Z ==============================================================================
2023-01-12T06:44:12.0316615Z Task         : ALOps Docker Create
2023-01-12T06:44:12.0316745Z Description  : Create Docker image from Business Central Artifacts
2023-01-12T06:44:12.0316926Z Version      : 1.454.3402
2023-01-12T06:44:12.0317072Z Author       : Hodor
2023-01-12T06:44:12.0317219Z Help         : Create Docker image based on NAV/BC Artifacts.
2023-01-12T06:44:12.0317378Z ==============================================================================
2023-01-12T06:44:36.5188603Z *** Validate configuration
2023-01-12T06:44:39.5356036Z *** Task Inputs:
2023-01-12T06:44:39.5470155Z 
2023-01-12T06:44:39.5661748Z name                      value                                                                                      
2023-01-12T06:44:39.5665620Z ----                      -----                                                                                      
2023-01-12T06:44:39.5667040Z artifactspecification     Specific                                                                                   
2023-01-12T06:44:39.5668008Z artifactversion           21.2                                                                                       
2023-01-12T06:44:39.5669470Z artifacttype              sandbox                                                                                    
2023-01-12T06:44:39.5670627Z artifactcountry           be                                                                                         
2023-01-12T06:44:39.5672092Z versionselect             Latest                                                                                     
2023-01-12T06:44:39.5673495Z artifacthint                                                                                                         
2023-01-12T06:44:39.5675792Z multitenant               False                                                                                      
2023-01-12T06:44:39.5678869Z memory                    8G                                                                                         
2023-01-12T06:44:39.5681906Z imageprefix               myImage                                                                                    
2023-01-12T06:44:39.5685272Z dockerregistry                                                                                                       
2023-01-12T06:44:39.5688330Z dockerusername                                                                                                       
2023-01-12T06:44:39.5690932Z dockerpassword                                                                                                       
2023-01-12T06:44:39.5694152Z storageaccount                                                                                                       
2023-01-12T06:44:39.5697350Z sastoken                                                                                                             
2023-01-12T06:44:39.5700767Z forcecreateimage          False                                                                                      
2023-01-12T06:44:39.5703299Z myscripts                                                                                                            
2023-01-12T06:44:39.5707288Z imagenametemplate         %IMAGE_PREFIX%:%ARTIFACT_TYPE%-%ARTIFACT_VERSION%-%ARTIFACT_COUNTRY%-%OS_VERSION%-%OS_LTSC%
2023-01-12T06:44:39.5710358Z licensefile                                                                                                          
2023-01-12T06:44:39.5713707Z includetesttoolkit        False                                                                                      
2023-01-12T06:44:39.5717123Z includetestlibrariesonly  False                                                                                      
2023-01-12T06:44:39.5720146Z includetestframeworkonly  False                                                                                      
2023-01-12T06:44:39.5723442Z includeperformancetoolkit False                                                                                      
2023-01-12T06:44:39.5723765Z 
2023-01-12T06:44:39.5751479Z 
2023-01-12T06:44:39.5765294Z 
2023-01-12T06:44:39.5978109Z *** For documentation, please visit   : https://www.alops.be/documentation
2023-01-12T06:44:39.5984398Z 
2023-01-12T06:44:39.9095111Z *** ALOps License:
2023-01-12T06:44:39.9125405Z   * Licensed To: X
2023-01-12T06:44:39.9131559Z 
2023-01-12T06:44:39.9447728Z *** Importing required PS-Functions
2023-01-12T06:44:40.1310634Z *** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
2023-01-12T06:44:40.1387598Z *** Check BcContainerHelper
2023-01-12T06:45:09.8994282Z *** Install BcContainerHelper
2023-01-12T06:45:27.1571277Z *** Load BcContainerHelper
2023-01-12T06:45:27.3629591Z BcContainerHelper version 4.0.10
2023-01-12T06:45:27.5327867Z BC.HelperFunctions emits usage statistics telemetry to Microsoft
2023-01-12T06:45:29.8726803Z 
2023-01-12T06:45:29.8728133Z ModuleType Version    Name                                ExportedCommands                                             
2023-01-12T06:45:29.8728970Z ---------- -------    ----                                ----------------                                             
2023-01-12T06:45:29.8729805Z Script     4.0.10     BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder, AddTele...
2023-01-12T06:45:29.8730262Z 
2023-01-12T06:45:29.8730503Z 
2023-01-12T06:45:29.8730623Z 
2023-01-12T06:45:29.8735068Z 
2023-01-12T06:45:29.8813716Z *** Get Artifact Url for Version [21.2] / Country [be] / Type [sandbox]: Latest
2023-01-12T06:45:29.8988252Z ##[command]"Get-BCArtifactUrl" 
2023-01-12T06:45:29.8989788Z Name                           Value                                                                                   
2023-01-12T06:45:29.8990665Z ----                           -----                                                                                   
2023-01-12T06:45:29.8991332Z select                         Latest                                                                                  
2023-01-12T06:45:29.8991958Z version                        21.2                                                                                    
2023-01-12T06:45:29.8993413Z type                           sandbox                                                                                 
2023-01-12T06:45:29.8994358Z country                        be                                                                                      
2023-01-12T06:45:29.8994775Z 
2023-01-12T06:45:29.8995024Z 
2023-01-12T06:45:29.8995156Z 
2023-01-12T06:45:31.9320390Z *** Artifact Url: [https://bcartifacts.azureedge.net/sandbox/21.2.49946.51980/be]
2023-01-12T06:45:31.9386409Z *** Build new Image based on [https://bcartifacts.azureedge.net/sandbox/21.2.49946.51980/be]
2023-01-12T06:45:31.9414410Z *** Artifact Type   : [sandbox]
2023-01-12T06:45:31.9432572Z *** Artifact Version: [21.2.49946.51980]
2023-01-12T06:45:31.9447633Z *** Artifact Country: [be]
2023-01-12T06:45:32.0584763Z *** OS: [2022]
2023-01-12T06:45:32.8575301Z *** OS version: [10.0.20348.1366]
2023-01-12T06:45:32.8590811Z *** Image Template: [%IMAGE_PREFIX%:%ARTIFACT_TYPE%-%ARTIFACT_VERSION%-%ARTIFACT_COUNTRY%-%OS_VERSION%-%OS_LTSC%]
2023-01-12T06:45:32.8643486Z *** ImageName: [myimage:sandbox-21.2.49946.51980-be-10.0.20348.1366-ltsc2022]
2023-01-12T06:45:32.8692175Z *** Set Pipeline variable $(ALOPS_BC_IMAGE) = 'myimage:sandbox-21.2.49946.51980-be-10.0.20348.1366-ltsc2022'
2023-01-12T06:45:33.7761576Z Error: No such image: myimage:sandbox-21.2.49946.51980-be-10.0.20348.1366-ltsc2022
2023-01-12T06:45:33.7929285Z *** No 'MyScripts' specified, skipping parse.
2023-01-12T06:45:33.7947843Z *** Create Image: myimage:sandbox-21.2.49946.51980-be-10.0.20348.1366-ltsc2022
2023-01-12T06:45:33.7974003Z ##[command]"New-BcImage" 
2023-01-12T06:45:33.7974531Z Name                           Value                                                                                   
2023-01-12T06:45:33.7976033Z ----                           -----                                                                                   
2023-01-12T06:45:33.7976639Z includePerformanceToolkit      False                                                                                   
2023-01-12T06:45:33.7977172Z includeTestToolkit             False                                                                                   
2023-01-12T06:45:33.7977785Z memory                         8G                                                                                      
2023-01-12T06:45:33.7978367Z artifactUrl                    https://bcartifacts.azureedge.net/sandbox/21.2.49946.51980/be                           
2023-01-12T06:45:33.7979023Z multitenant                    False                                                                                   
2023-01-12T06:45:33.7979674Z imageName                      myimage:sandbox-21.2.49946.51980-be-10.0.20348.1366-ltsc2022                            
2023-01-12T06:45:33.7980338Z includeTestLibrariesOnly       False                                                                                   
2023-01-12T06:45:33.7980947Z includeTestFrameworkOnly       False                                                                                   
2023-01-12T06:45:33.7981217Z 
2023-01-12T06:45:33.7981353Z 
2023-01-12T06:45:33.7981459Z 
2023-01-12T06:45:34.1761647Z Downloading application artifact /sandbox/21.2.49946.51980/be
2023-01-12T06:45:34.1778643Z https://bcartifacts.azureedge.net/sandbox/21.2.49946.51980/be
2023-01-12T06:45:34.1949133Z Downloading C:\Users\VssAdministrator\AppData\Local\Temp\2e086cf3-f070-4c1e-8be2-b0d9bdfee0d7.zip
2023-01-12T06:45:34.2151343Z Using WebClient
2023-01-12T06:45:50.3876147Z Unpacking application artifact to tmp folder using 7zip
2023-01-12T06:46:01.9382874Z Downloading platform artifact /sandbox/21.2.49946.51980/platform
2023-01-12T06:46:01.9408213Z https://bcartifacts.azureedge.net/sandbox/21.2.49946.51980/platform
2023-01-12T06:46:01.9487876Z Downloading C:\Users\VssAdministrator\AppData\Local\Temp\1dbe673e-3fae-4eff-8bb6-a2afdfe34eed.zip
2023-01-12T06:46:01.9508407Z Using WebClient
2023-01-12T06:46:11.0063079Z Unpacking platform artifact to tmp folder using 7zip
2023-01-12T06:46:38.3607403Z Downloading Prerequisite Components
2023-01-12T06:46:38.3781489Z Downloading c:\bcartifacts.cache\sandbox\21.2.49946.51980\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
2023-01-12T06:46:38.3798665Z Using WebClient
2023-01-12T06:46:38.5630877Z Downloading c:\bcartifacts.cache\sandbox\21.2.49946.51980\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
2023-01-12T06:46:38.5652566Z Using WebClient
2023-01-12T06:46:40.5715849Z Building image myimage:sandbox-21.2.49946.51980-be-10.0.20348.1366-ltsc2022 based on mcr.microsoft.com/businesscentral:10.0.20348.1366 with https://bcartifacts.azureedge.net/sandbox/21.2.49946.51980/be
2023-01-12T06:46:40.5736950Z Pulling latest image mcr.microsoft.com/businesscentral:10.0.20348.1366
2023-01-12T06:46:41.5087202Z 10.0.20348.1366: Pulling from businesscentral
2023-01-12T06:46:41.5959703Z 97f65a0ec59e: Already exists
2023-01-12T06:46:41.6545227Z f02a459b6762: Already exists
2023-01-12T06:46:41.6990379Z 9c38b2d34453: Already exists
2023-01-12T06:46:41.7697403Z a0ab2aa0e6d8: Already exists
2023-01-12T06:46:42.6111432Z 79f24bba0c86: Pulling fs layer
2023-01-12T06:46:42.6135328Z f584d38ef9a3: Pulling fs layer
2023-01-12T06:46:42.6174430Z 934d40ee38ea: Pulling fs layer
2023-01-12T06:46:42.6203908Z 3cbd7d061910: Pulling fs layer
2023-01-12T06:46:42.6219698Z 47aaef0456b0: Pulling fs layer
2023-01-12T06:46:42.6233779Z 1279019e0e0b: Pulling fs layer
2023-01-12T06:46:42.6248244Z 37b03b47c33e: Pulling fs layer
2023-01-12T06:46:42.6267884Z 0093a8b08c69: Pulling fs layer
2023-01-12T06:46:42.6284154Z 2966b484babf: Pulling fs layer
2023-01-12T06:46:42.6299534Z 5e63245ae471: Pulling fs layer
2023-01-12T06:46:42.6344669Z 7ffbe00ed404: Pulling fs layer
2023-01-12T06:46:42.6363239Z 37b03b47c33e: Waiting
2023-01-12T06:46:42.6382707Z 0093a8b08c69: Waiting
2023-01-12T06:46:42.6397853Z 2966b484babf: Waiting
2023-01-12T06:46:42.6417478Z 5e63245ae471: Waiting
2023-01-12T06:46:42.6442513Z 7ffbe00ed404: Waiting
2023-01-12T06:46:42.6477408Z 3cbd7d061910: Waiting
2023-01-12T06:46:42.6494566Z 47aaef0456b0: Waiting
2023-01-12T06:46:42.6550025Z 1279019e0e0b: Waiting
2023-01-12T06:46:42.6844162Z f584d38ef9a3: Verifying Checksum
2023-01-12T06:46:42.6862474Z f584d38ef9a3: Download complete
2023-01-12T06:46:42.6880561Z 79f24bba0c86: Verifying Checksum
2023-01-12T06:46:42.6896586Z 79f24bba0c86: Download complete
2023-01-12T06:46:42.7679092Z 934d40ee38ea: Verifying Checksum
2023-01-12T06:46:42.7694466Z 934d40ee38ea: Download complete
2023-01-12T06:46:42.8354461Z 3cbd7d061910: Verifying Checksum
2023-01-12T06:46:42.8376441Z 3cbd7d061910: Download complete
2023-01-12T06:46:42.8417246Z 1279019e0e0b: Download complete
2023-01-12T06:46:42.9107920Z 0093a8b08c69: Verifying Checksum
2023-01-12T06:46:42.9163422Z 0093a8b08c69: Download complete
2023-01-12T06:46:42.9765154Z 2966b484babf: Verifying Checksum
2023-01-12T06:46:42.9783509Z 2966b484babf: Download complete
2023-01-12T06:46:43.0612135Z 5e63245ae471: Verifying Checksum
2023-01-12T06:46:43.0626520Z 5e63245ae471: Download complete
2023-01-12T06:46:43.7559449Z 7ffbe00ed404: Verifying Checksum
2023-01-12T06:46:43.7573812Z 7ffbe00ed404: Download complete
2023-01-12T06:46:48.7784249Z 47aaef0456b0: Verifying Checksum
2023-01-12T06:46:48.7802632Z 47aaef0456b0: Download complete
2023-01-12T06:46:53.7050098Z 79f24bba0c86: Pull complete
2023-01-12T06:46:55.7229586Z 37b03b47c33e: Download complete
2023-01-12T06:47:00.1136004Z f584d38ef9a3: Pull complete
2023-01-12T06:47:06.0050933Z 934d40ee38ea: Pull complete
2023-01-12T06:47:08.8615375Z 3cbd7d061910: Pull complete
2023-01-12T06:48:34.6180099Z 47aaef0456b0: Pull complete
2023-01-12T06:48:35.4810875Z 1279019e0e0b: Pull complete
2023-01-12T06:49:04.7332584Z 37b03b47c33e: Pull complete
2023-01-12T06:49:05.7205326Z 0093a8b08c69: Pull complete
2023-01-12T06:49:06.6337162Z 2966b484babf: Pull complete
2023-01-12T06:49:07.4621346Z 5e63245ae471: Pull complete
2023-01-12T06:49:08.3634505Z 7ffbe00ed404: Pull complete
2023-01-12T06:49:08.4936252Z Digest: sha256:85bc2adc4e2ce3fae83fe1af0aa1822a576d3f61ff6668df71d56bcb4165f4a6
2023-01-12T06:49:08.5350540Z Status: Downloaded newer image for mcr.microsoft.com/businesscentral:10.0.20348.1366
2023-01-12T06:49:08.5706464Z mcr.microsoft.com/businesscentral:10.0.20348.1366
2023-01-12T06:49:08.7666921Z Generic Tag: 1.0.2.13
2023-01-12T06:49:08.8442577Z Container OS Version: 10.0.20348.1366 (ltsc2022)
2023-01-12T06:49:08.8479816Z Host OS Version: 10.0.20348.1366 (ltsc2022)
2023-01-12T06:49:08.8525495Z Using process isolation
2023-01-12T06:49:08.8687527Z Files in c:\bcartifacts.cache\hgeuifqq.rgh\my:
2023-01-12T06:49:08.8772913Z Copying Platform Artifacts
2023-01-12T06:49:08.8869915Z c:\bcartifacts.cache\sandbox\21.2.49946.51980\platform
2023-01-12T06:49:30.6166385Z Copying Database
2023-01-12T06:49:34.1085444Z Copying Licensefile
2023-01-12T06:49:34.1249654Z Copying ConfigurationPackages
2023-01-12T06:49:34.1294777Z C:\bcartifacts.cache\sandbox\21.2.49946.51980\be\ConfigurationPackages
2023-01-12T06:49:34.2528150Z Copying Extensions
2023-01-12T06:49:34.2552059Z C:\bcartifacts.cache\sandbox\21.2.49946.51980\be\Extensions
2023-01-12T06:49:36.4865008Z Copying Applications.BE
2023-01-12T06:49:36.4885607Z C:\bcartifacts.cache\sandbox\21.2.49946.51980\be\Applications.BE
2023-01-12T06:49:38.4643531Z c:\bcartifacts.cache\hgeuifqq.rgh
2023-01-12T06:51:12.0326243Z Sending build context to Docker daemon  2.191GB
2023-01-12T06:51:12.0333472Z 
2023-01-12T06:51:12.3028674Z Step 1/6 : FROM mcr.microsoft.com/businesscentral:10.0.20348.1366
2023-01-12T06:51:12.3034914Z  ---> d0e9eb05d8aa
2023-01-12T06:51:12.3040466Z Step 2/6 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=Y artifactUrl=https://bcartifacts.azureedge.net/sandbox/21.2.49946.51980/be filesOnly=False
2023-01-12T06:51:12.3534698Z  ---> Running in a3fdb49398cf
2023-01-12T06:51:13.9025872Z Removing intermediate container a3fdb49398cf
2023-01-12T06:51:13.9033070Z  ---> aa097ab4fd27
2023-01-12T06:51:13.9037656Z Step 3/6 : COPY my /run/
2023-01-12T06:51:15.0285835Z  ---> bb7d59997f9d
2023-01-12T06:51:15.0292259Z Step 4/6 : COPY NAVDVD /NAVDVD/
2023-01-12T06:53:48.3455179Z  ---> 919bdb44a7ac
2023-01-12T06:53:48.3456894Z Step 5/6 : RUN \Run\start.ps1 -installOnly
2023-01-12T06:53:48.4422205Z  ---> Running in 182150ffadc6
2023-01-12T06:54:00.3558867Z c:\run\my folder doesn't exist, creating it
2023-01-12T06:54:01.3376574Z Using installer from C:\Run\210-new
2023-01-12T06:54:04.5597325Z Installing Business Central
2023-01-12T06:54:04.5597883Z Installing from DVD
2023-01-12T06:54:04.5598271Z Starting Local SQL Server
2023-01-12T06:54:06.1891951Z WARNING: Waiting for service 'SQL Server (SQLEXPRESS) (MSSQL$SQLEXPRESS)' to 
2023-01-12T06:54:06.1906092Z start...
2023-01-12T06:54:06.9737936Z Starting Internet Information Server
2023-01-12T06:54:07.4631422Z Copying Service Tier Files
2023-01-12T06:54:07.4851409Z C:\NAVDVD\ServiceTier\Program Files
2023-01-12T06:54:09.7255341Z C:\NAVDVD\ServiceTier\System64Folder
2023-01-12T06:54:09.8353661Z Copying PowerShell Scripts
2023-01-12T06:54:09.8369826Z C:\NAVDVD\WindowsPowerShellScripts\Cloud\NAVAdministration
2023-01-12T06:54:09.9260813Z C:\NAVDVD\WindowsPowerShellScripts\WebSearch
2023-01-12T06:54:09.9584916Z Copying Web Client Files
2023-01-12T06:54:09.9620124Z C:\NAVDVD\WebClient\Microsoft Dynamics NAV
2023-01-12T06:54:17.0590146Z Copying ModernDev Files
2023-01-12T06:54:17.0600294Z C:\NAVDVD
2023-01-12T06:54:17.0907527Z C:\NAVDVD\ModernDev\program files\Microsoft Dynamics NAV
2023-01-12T06:54:17.5392600Z Copying additional files
2023-01-12T06:54:17.5519605Z Copying ConfigurationPackages
2023-01-12T06:54:17.5530553Z C:\NAVDVD\ConfigurationPackages
2023-01-12T06:54:17.6191295Z Copying Test Assemblies
2023-01-12T06:54:17.6203265Z C:\NAVDVD\Test Assemblies
2023-01-12T06:54:17.6850280Z Copying Extensions
2023-01-12T06:54:17.6867150Z C:\NAVDVD\Extensions
2023-01-12T06:54:18.1693966Z Copying Applications
2023-01-12T06:54:18.1707234Z C:\NAVDVD\Applications
2023-01-12T06:54:19.7439784Z Copying Applications.BE
2023-01-12T06:54:19.7463851Z C:\NAVDVD\Applications.BE
2023-01-12T06:54:20.0816111Z Copying dependencies
2023-01-12T06:54:20.1348113Z Copying ReportBuilder
2023-01-12T06:54:37.6640527Z Importing PowerShell Modules
2023-01-12T06:54:40.9513318Z Restoring CRONUS Demo Database
2023-01-12T06:54:55.1569674Z Setting CompatibilityLevel for CRONUS on localhost\SQLEXPRESS
2023-01-12T06:54:56.6315119Z Modifying Business Central Service Tier Config File for Docker
2023-01-12T06:54:56.6977286Z Creating Business Central Service Tier
2023-01-12T06:54:56.8318694Z Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
2023-01-12T06:54:57.1368912Z Starting Business Central Service Tier
2023-01-12T06:57:33.2333588Z Importing CRONUS license file
2023-01-12T06:57:34.6032431Z Stopping Business Central Service Tier
2023-01-12T06:57:35.1595861Z Installation took 214 seconds
2023-01-12T06:57:35.1615227Z Installation complete
2023-01-12T07:00:28.3430359Z re-exec error: exit status 1: output: hcsshim::ImportLayer - failed failed in Win32: The system cannot find the path specified. (0x3)
2023-01-12T07:00:34.2004633Z BcContainerHelper\New-BcImage Telemetry Correlation Id: b5b5dfaf-d0e8-4261-91d2-77aba9e01971
2023-01-12T07:00:35.1433158Z ##[error]Docker Build failed with exit code 1
2023-01-12T07:00:35.7189121Z ##[section]Finishing: ALOPS - Create Docker Image

Expected behavior A clear and concise description of what you expected to happen. I expected the docker image to be created. Same code worked yesterday as it is part of our validation build for our Pull Requests

Screenshots If applicable, add screenshots to help explain your problem. You can easily paste them in here.

Additional context Add any other context about the problem here.

SorenKlemmensen commented 1 year ago

Looks like it was a Microsoft issue. It works with 21.2.49946.51985 and 21.2.49946.51980 fails by the looks of it. We can close this one.

waldo1001 commented 1 year ago

@SorenKlemmensen , just tested with that faulty image on our build server image

Mine was successful 🤔.

Weird..

SorenKlemmensen commented 1 year ago

That is weird. It happened again yesterday, but resolved it self in a few hours before I could get at it. Annoying to say it politely. I will do some tests to see if I can figure it out.