Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folders feature doesn't work for Base Images v1.0.2.6+ #512

Closed
lippertmarkus opened this issue May 31, 2022 · 7 comments
Closed

Folders feature doesn't work for Base Images v1.0.2.6+ #512

lippertmarkus opened this issue May 31, 2022 · 7 comments

Comments

@lippertmarkus
Copy link
Contributor

lippertmarkus commented May 31, 2022

Base Image version v1.0.2.5 works

Build

New-BcImage -artifactUrl (Get-BCArtifactUrl -version 19.3 -storageAccount bcartifacts -type OnPrem -country at) -includeTestToolkit -includePerformanceToolkit -imageName old -licenseFile "<license>" -baseImage "mcr.microsoft.com/businesscentral:10.0.20348.707-1.0.2.5"

Run

docker run --rm -m 10GB -e "folders=c:\run=https://ppishare.blob.core.windows.net/test/dev_main.zip?sp=r&st=2022-05-31T06:56:50Z&se=2022-06-30T14:56:50Z&spr=https&sv=2020-08-04&sr=b&sig=u8Hypb7m4No207Iyg6Ra3oMCIlRUJxZlsSaCRE53eQI%3D" -e accept_eula=y -e accept_outdated=y old:onprem-19.3.34541.35002-at
Setting up folders...
Downloading https://ppishare.blob.core.windows.net/test/dev_main.zip?sp=r&st=2022-05-31T06:56:50Z&se=2022-06-30T14:56:50Z&spr=https&sv=2020-08-04&sr=b&sig=u8Hypb7m4No207Iyg6Ra3oMCIlRUJxZlsSaCRE53eQI%3D to c:\run
Extracting file in temp folder
Moving all extracted files to target folder c:\run
+Setting up folders took 2 seconds
This seems to be a regular service start
Initializing...
Starting Container
...

Base Image version v1.0.2.7 doesn't work

Build

New-BcImage -artifactUrl (Get-BCArtifactUrl -version 19.3 -storageAccount bcartifacts -type OnPrem -country at) -includeTestToolkit -includePerformanceToolkit -imageName new -licenseFile "<license>" -baseImage "mcr.microsoft.com/businesscentral:10.0.20348.707-1.0.2.7"

Run

docker run --rm -m 10GB -e "folders=c:\run=https://ppishare.blob.core.windows.net/test/dev_main.zip?sp=r&st=2022-05-31T06:56:50Z&se=2022-06-30T14:56:50Z&spr=https&sv=2020-08-04&sr=b&sig=u8Hypb7m4No207Iyg6Ra3oMCIlRUJxZlsSaCRE53eQI%3D" -e accept_eula=y -e accept_outdated=y new:onprem-19.3.34541.35002-at
Setting up folders...
Downloading https://ppishare.blob.core.windows.net/test/dev_main.zip?sp=r&st=2022-05-31T06:56:50Z&se=2022-06-30T14:56:50Z&spr=https&sv=2020-08-04&sr=b&sig=u8Hypb7m4No207Iyg6Ra3oMCIlRUJxZlsSaCRE53eQI%3D to c:\run
Extracting file in temp folder
Moving all extracted files to target folder c:\run
-Cannot create a file when that file already exists.

BcContainerHelper version 3.0.10

@lippertmarkus
Copy link
Contributor Author

@freddydk any feedback on this?

@freddydk
Copy link
Contributor

Sorry, didn't see this before going on vacation - will have a look at this.

@NAVRockClimber
Copy link

@freddydk how is the status on this one?

Until now we had been able to stay on an older the Generic Image version but with the current changes you we are forced to update due to no NextMajor container will start anymore or NextMajor-Pipeline will succeed.

As far as I was able to analyze the issue from @lippertmarkus this happens if you download a zip-file that contains a my folder.

I looks to me like like the condition for the if-block here is not met and the else-block is executed where Move-Item will fail due to the folder c:\run\my already exists.

@NAVRockClimber
Copy link

NAVRockClimber commented Aug 15, 2022

@freddydk I uploaded a test file for you here: https://glpmtstorage.blob.core.windows.net/cdn/build_main.zip

That one is used in out nextMajor pipelines.

edit:
We pull it into the container by adding -additionalParameters @("--env folders=c:\run=https://glpmtstorage.blob.core.windows.net/cdn/build_main.zip") to New-BcContainer.

freddydk pushed a commit that referenced this issue Aug 15, 2022
@freddydk
Copy link
Contributor

You can try to add this to your new-bccontainer:

-myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue512/start.ps1")

@NAVRockClimber
Copy link

I tested it and everything looks good so far. The NextMajor containers start regularly and I did not see any side effect on other containers. Will you create a new generic right away or do you have a release cycle?

@freddydk
Copy link
Contributor

new generic images created long ago, assuming it was resolved long ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants