Closed Arthurvdv closed 9 months ago
You have multiple agents on this server? Just to know if the maintenance is running while another task is running something else.
Single agent per server, so no other tasks could be running.
Also the error is consistent every day after a certain point in time, so I guessing something with the filesystem?
We have an improvement on this, ready to be released.. . Today or tomorrow.
Dear @Arthurvdv ,
Please try our latest release v1.459. We made a couple of improvements on this step which should drastically improve this. The delete-loop will individually try to remove each folder, if an error should occur the step will proceed with the other cleanup and not stop.
Kind regards,
The improvement indeed seems te be working, awesome!
2023-10-05T22:16:46.5637970Z * C:\bcartifacts.cache\sandbox\23.0.12034.12863\base (Failed)
2023-10-05T22:16:46.5650599Z * C:\bcartifacts.cache\sandbox\23.0.12034.12863\be (Failed)
2023-10-05T22:16:46.5663269Z * C:\bcartifacts.cache\sandbox\23.0.12034.12863\platform (Failed)
2023-10-05T22:16:46.5677285Z * C:\bcartifacts.cache\sandbox\23.0.12034.12877\be (Failed)
2023-10-05T22:16:46.5690799Z * C:\bcartifacts.cache\sandbox\23.0.12034.12877\platform (Failed)
2023-10-05T22:16:46.7369952Z *** BC Artifact cleanup failed on 5 items.
Is this the end of the road or is it somehow possible to figure out on the why these artifacts can't be deleted?
Full log
2023-10-05T22:15:43.5499095Z ##[section]Starting: Agent Maintenance
2023-10-05T22:15:43.5679624Z ==============================================================================
2023-10-05T22:15:43.5679709Z Task : ALOps Agent Maintenance
2023-10-05T22:15:43.5679748Z Description : Cleanup and maintain DevOps a Agent for Business Central
2023-10-05T22:15:43.5679804Z Version : 1.459.4971
2023-10-05T22:15:43.5679839Z Author : Hodor
2023-10-05T22:15:43.5679874Z Help : Cleanup and maintain DevOps a Agent for Business Central.
2023-10-05T22:15:43.5679932Z ==============================================================================
2023-10-05T22:15:44.2487754Z *** Validate configuration
2023-10-05T22:15:44.2883951Z *** Task Inputs:
2023-10-05T22:15:44.2913134Z
2023-10-05T22:15:44.2973969Z name value
2023-10-05T22:15:44.2975643Z ---- -----
2023-10-05T22:15:44.2977334Z removeoldtasks False
2023-10-05T22:15:44.2978250Z removeunusedcontainers True
2023-10-05T22:15:44.2980021Z pruneimagesdayscreated 1
2023-10-05T22:15:44.2981649Z pruneimagesosbased True
2023-10-05T22:15:44.2982512Z removebcartifacts True
2023-10-05T22:15:44.2983296Z bcartifactscachefolder C:\bcartifacts.cache
2023-10-05T22:15:44.2985062Z daysunused 1
2023-10-05T22:15:44.2985162Z
2023-10-05T22:15:44.2998510Z
2023-10-05T22:15:44.3002950Z
2023-10-05T22:15:44.3112744Z *** For documentation, please visit : https://www.alops.be/documentation
2023-10-05T22:15:44.3115423Z
2023-10-05T22:15:44.7470526Z *** ALOps License:
2023-10-05T22:15:44.7483710Z * Licensed To: Van Roey (Collection License)
2023-10-05T22:15:44.7488857Z
2023-10-05T22:15:44.7576505Z *** Importing required PS-Functions
2023-10-05T22:15:44.7714282Z *** Importing required Task-Functions
2023-10-05T22:15:44.8192209Z *** Start Container prune
2023-10-05T22:15:44.8197278Z *** Prune Docker Containers
2023-10-05T22:15:45.0903135Z Total reclaimed space: 0B
2023-10-05T22:15:45.0945346Z *** Start Image prune
2023-10-05T22:15:45.0956127Z *** Prune Docker Images
2023-10-05T22:16:40.2162137Z Deleted Images:
2023-10-05T22:16:40.2162655Z untagged: myimage:sandbox-23.0.12034.12874-base-10.0.20348.1906-ltsc2022
2023-10-05T22:16:40.2162808Z deleted: sha256:dea0a6ad74859d7c53b634ee7e3b03a864953afbb22339185660955f0ec40f02
2023-10-05T22:16:40.2164419Z deleted: sha256:20cbb7ccac75659efa6b083e475b51e3fa1ece9810ff739023ac6e30d8894bb9
2023-10-05T22:16:40.2164633Z deleted: sha256:0a77d967e080aa5bbc785ddaa459f859610626bed4d40b4e6ff736b240202187
2023-10-05T22:16:40.2164883Z deleted: sha256:d00459d12cd8b1e53ec2b957e75bf4be51954b6bbf9cb37b5b4759dfb150997f
2023-10-05T22:16:40.2165165Z deleted: sha256:570052c5d53ac253a9d311b6816237a6fc9fff958631ccdcc7df4a3796ab6abb
2023-10-05T22:16:40.2166790Z deleted: sha256:54f7d3dd1bdeb49f66d95807e8a4eedfcf116df83e5c2aa9ff7ce6bc0e38a450
2023-10-05T22:16:40.2166984Z deleted: sha256:db4c690d3c8dc2ff3843f4d54c00c678f07273ee26f00ca211459f6bd4d6b0b2
2023-10-05T22:16:40.2167126Z deleted: sha256:be931199dc473957087bd87a0fd69b30e0c060f2b7efc38d2720fa5fee266614
2023-10-05T22:16:40.2167263Z deleted: sha256:8f6d9ee203a7f52b3cd9a28e7eb71afc7965ca15c0b0ab8e2108ddcf6d76a2d8
2023-10-05T22:16:40.2167401Z deleted: sha256:a75221cf869c9deaca9b4ceac34c5556faa208bd2739b3b2c6678fde667b6c18
2023-10-05T22:16:40.2167747Z untagged: myimage:sandbox-23.0.12034.12871-w1-10.0.20348.1906-ltsc2022
2023-10-05T22:16:40.2167885Z deleted: sha256:7f913d27c28ed9b75153f5bece1c66e3af32087fbcfebf8fc3dc53f9ea337f94
2023-10-05T22:16:40.2168678Z deleted: sha256:4c692b32bc7eeed8428f78da754d542f1e16c05d980fa8db7667392fead155c9
2023-10-05T22:16:40.2168914Z deleted: sha256:662fce889184f52a047783cb216084d9ad951f82e795e0c78f797695e56bf642
2023-10-05T22:16:40.2169148Z deleted: sha256:7e5fafbf2ad23062918deaba90efdbd530225b93152c480347f842f0d78d5210
2023-10-05T22:16:40.2169317Z deleted: sha256:635e133589d25761f72a2ad7751412ecc3d4857e44586fc9c0c324f8b78c6984
2023-10-05T22:16:40.2170522Z deleted: sha256:fccbd489719915d62f178d344feb534ac1d7f2df6d942137018f63ef9f00d67a
2023-10-05T22:16:40.2170727Z deleted: sha256:03dfa8e66e720662d6857a8d1bbb413562c692ac3a5043443bfe5bc7c16a7ef1
2023-10-05T22:16:40.2170929Z deleted: sha256:ec7f3aa1ecc6a5f1917cf80451f1ae5c26d9e341f9d6f885f09b933cd6417570
2023-10-05T22:16:40.2171067Z deleted: sha256:f32a2f915e0dcf8b883cd9b8414c6eb19b531846895be778399da00949ec0b0f
2023-10-05T22:16:40.2171235Z deleted: sha256:a37d08add73d0e32d42fa2c58282c64969e2b16eb7f0752f625cc0ab2c8a324f
2023-10-05T22:16:40.2171525Z untagged: myimage:sandbox-23.0.12034.12871-base-10.0.20348.1906-ltsc2022
2023-10-05T22:16:40.2171666Z deleted: sha256:37459d33e02f42f819bbc12e8000e4d60f7a2d7ed9367d9b1c88f566ad0662e3
2023-10-05T22:16:40.2171805Z deleted: sha256:bd909a5386bfbd1dd4c2e75597a3d2e1887e08a3456a6480c35e146b5e6df68b
2023-10-05T22:16:40.2171940Z deleted: sha256:9cccf8b7f9c1609b5fb44b7fd4c41f15304a122fc650704058bdc0a147b31208
2023-10-05T22:16:40.2172077Z deleted: sha256:956d86b9e80030fd5c7c620b8a949ec233a872bfd1fee001189378eef4099cf5
2023-10-05T22:16:40.2172213Z deleted: sha256:9c4da36d7fccc58cf07b834e4102b7912ca2b2759fb6ce1b2234e09aa59c45c5
2023-10-05T22:16:40.2172345Z deleted: sha256:f1a38573619c90239417c00407e2f84b0b6487fe5903d79b1d77c14d48b19472
2023-10-05T22:16:40.2172478Z deleted: sha256:0b15a6facdbb7c0fcaa7ebaaa448c83f7ce928613968bc3d24cd98ed2b09821d
2023-10-05T22:16:40.2172615Z deleted: sha256:5e7bc5f28578426cb966fe7c78ca67963d12ed455ec9ebd28e6afdc1260136fb
2023-10-05T22:16:40.2172755Z deleted: sha256:33c002db2c61a388aee1ed9f751f3307f858e60a852c0b6895a8760c3e9a0ce1
2023-10-05T22:16:40.2172889Z deleted: sha256:3276ccdf5ef5c1d65a2fb45f2e73ce6d532444c98f3d8b522b01c1ff778d7e17
2023-10-05T22:16:40.2173112Z untagged: myimage:sandbox-23.0.12034.12863-base-10.0.20348.1906-ltsc2022
2023-10-05T22:16:40.2173249Z deleted: sha256:b305ce2d5e69f8089353586683870a8c3ec3b88dfb18834c1f456e7214a0ab57
2023-10-05T22:16:40.2173387Z deleted: sha256:42aa667d4a1f6e11edca041587c0db8de87eb663686fab6e5efc392c0117f2e0
2023-10-05T22:16:40.2173522Z deleted: sha256:89b19b45c6b1b1907c50ff323904109876956a200080ca0faadc27475edc41af
2023-10-05T22:16:40.2173656Z deleted: sha256:7868fb184ab92a71e04e7fb0326f5162962961f37d619d183cba4540080b103d
2023-10-05T22:16:40.2173788Z deleted: sha256:a7f5950e5d7552dcb92c58ef0685d2d019da30811c2ff607fd504ffd7c19f54e
2023-10-05T22:16:40.2173924Z deleted: sha256:55729b2f6360eb54e5c667f40f25897350af10ee983d52ffeb08ac5a9ff1e125
2023-10-05T22:16:40.2174156Z deleted: sha256:d6a892d0810879e6edf22378bc51627a7e84cc26ce93ec35fb3a39223862090c
2023-10-05T22:16:40.2174292Z deleted: sha256:9bea45d3ca5ff316a51037620a6e288a601a931f0299dd8995bd921a4f17f5b2
2023-10-05T22:16:40.2174428Z deleted: sha256:2c3f2ee841d2cf9a9c313ca412d595611822b7b2d0ae3e5869712385b1465f8a
2023-10-05T22:16:40.2174563Z deleted: sha256:a7f2c6ea4a9d6bd36ecadb406d6e5ac24dc8156c22aeaf7cccb199daccefae95
2023-10-05T22:16:40.2174754Z untagged: myimage:sandbox-23.0.12034.12877-base-10.0.20348.1906-ltsc2022
2023-10-05T22:16:40.2174892Z deleted: sha256:84a08b498ac2f6920b979ddb7e75e4fd37739621d88a124c916d4cc52e8e64bd
2023-10-05T22:16:40.2175023Z deleted: sha256:f7fb85568ff5dfb660fed1135844dd7b0f6ee0b4718964289f9a72457a16b2d8
2023-10-05T22:16:40.2175158Z deleted: sha256:ff8bd5aec6938ee483b68e8426557922348e5d8dc87f7fbe0228846282d9f8ff
2023-10-05T22:16:40.2175292Z deleted: sha256:fc2055114a4aa707bbfc0ae0f332d1d687e75beec63464e1444c3c1b21940cfe
2023-10-05T22:16:40.2175429Z deleted: sha256:72ebadebe60967e4fbf8bca59c4278d3a454992b7623372f686d4c19ba5ac664
2023-10-05T22:16:40.2175565Z deleted: sha256:e31a95e2c267dc6021fb59a260307ece4b0e2bed05d03de79b6635c26bacfd4e
2023-10-05T22:16:40.2175699Z deleted: sha256:68e2af76f98a18a711849f394ce4b6b5d80042ae351216fd7d991e45d298f567
2023-10-05T22:16:40.2175834Z deleted: sha256:346074272971879f85494d23bc1f086b2d8714dd13302cc21d99f65829ef28ed
2023-10-05T22:16:40.2175969Z deleted: sha256:f44c08a95b26c44dd2b2695e763a4d72fc9d8c0037763267ee1dc6151ce4a033
2023-10-05T22:16:40.2176476Z deleted: sha256:0f9dc4d47a5022a702440b36e7c14c3a77db0fe5b33434b4363662c4b4a840a9
2023-10-05T22:16:40.2176673Z untagged: myimage:sandbox-23.0.12034.12871-be-10.0.20348.1906-ltsc2022
2023-10-05T22:16:40.2176810Z deleted: sha256:48c0e9f8f56d2e224efb2e2e98944843130d0511e7d8deb474182b84ad8211fe
2023-10-05T22:16:40.2176946Z deleted: sha256:8dc3edf811fc9fb24a6c6b94575f27ecb7ed186fdb22dea4df1a9038736d8935
2023-10-05T22:16:40.2177084Z deleted: sha256:818fb35c65949b290687fdaab113c880f892d536bec18b2fafcba48789d6bc45
2023-10-05T22:16:40.2177219Z deleted: sha256:78e1b57fb427bfebf537d6c1db822bb51218ecb8e77684e13b6ed64bb292c5c8
2023-10-05T22:16:40.2177355Z deleted: sha256:f32c7952d9a592396504b9cf7c47e7819a5fc6f02d0c7289db2b5d5b25b56dec
2023-10-05T22:16:40.2177491Z deleted: sha256:af9b18f14621874474072549b4b7c613eea161051cdd389ee1c497a6a592a3c5
2023-10-05T22:16:40.2177626Z deleted: sha256:1b25036f737117395e856900295a2475ab2721ae3a82f382a8556bfb629b1cc3
2023-10-05T22:16:40.2177759Z deleted: sha256:d713cb09e8fd4f1120abc2f81c306f42b57b5610a54b2981cf256acbf65e40a0
2023-10-05T22:16:40.2177965Z deleted: sha256:ffdada2014f93c611d566f426e42887990711ec57b43d25c5fcb88d92bf4a1e5
2023-10-05T22:16:40.2178097Z deleted: sha256:e87f59c0d10e6567a66bf45d8be186db89b28d18de452c92bbae363355fa1a10
2023-10-05T22:16:40.2178284Z untagged: myimage:sandbox-23.0.12034.12863-be-10.0.20348.1906-ltsc2022
2023-10-05T22:16:40.2178418Z deleted: sha256:ce85d082707c50f3a982ba1c18fa582c885d2a5eae35792ebffb5e4b055f0b5e
2023-10-05T22:16:40.2178556Z deleted: sha256:6d9bb6cdf80a304334379336cd911fbfc918543450561b2b4d28c56f3da200b2
2023-10-05T22:16:40.2178693Z deleted: sha256:8ce0ba40f09b7fee61aee19d313637ddf2570982daa1c4e186ca02881fe515ec
2023-10-05T22:16:40.2178827Z deleted: sha256:16f89d39ff32f2aa3a1c9b28427f2d6029cb301b1172796831e09884ad33bf39
2023-10-05T22:16:40.2178961Z deleted: sha256:70ccca1b55a9a4df02d873ad4f87cefd68c2a12ad56f7226c8ae61e9b08fc6fc
2023-10-05T22:16:40.2179097Z deleted: sha256:1a8551807bba026be786a0012313259620daf157e7da4a358b062e0a638e1de2
2023-10-05T22:16:40.2179228Z deleted: sha256:9014b172f65bb2326fd1a7f20856914c82a82ce05b0d4553b1a3da5102cf4317
2023-10-05T22:16:40.2179363Z deleted: sha256:906ddfca5ead4a521bbb87864b3b21ef3e5d781ce652495cf6a1ed7039acfaa4
2023-10-05T22:16:40.2179497Z deleted: sha256:b80986c42c29d48d673299850106c4ec263cf97bce3f32c57c936ea655e564fa
2023-10-05T22:16:40.2179632Z deleted: sha256:76d944e85043030940b743f00b3a897978bc1357643770c0cfdc028f60ccb896
2023-10-05T22:16:40.2180041Z untagged: mcr.microsoft.com/businesscentral:10.0.20348.1906
2023-10-05T22:16:40.2180189Z untagged: mcr.microsoft.com/businesscentral@sha256:9a12bd9733c4bd49affddf5a8dbc0bf408551b50eb4a85a8f60efab4301184f4
2023-10-05T22:16:40.2180268Z
2023-10-05T22:16:40.2180344Z Total reclaimed space: 35.03GB
2023-10-05T22:16:40.2201113Z *** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
2023-10-05T22:16:40.2237713Z *** Check BcContainerHelper
2023-10-05T22:16:40.3079711Z *** Load BcContainerHelper
2023-10-05T22:16:40.4302975Z BcContainerHelper version 5.0.7
2023-10-05T22:16:40.7480382Z BC.HelperFunctions emits usage statistics telemetry to Microsoft
2023-10-05T22:16:44.9830606Z
2023-10-05T22:16:44.9831490Z ModuleType Version Name ExportedCommands
2023-10-05T22:16:44.9831919Z ---------- ------- ---- ----------------
2023-10-05T22:16:44.9832151Z Script 5.0.7 BcContainerHelper {Add-FontsToBcContainer, Add-GitToAlProjectFolder, AddTele...
2023-10-05T22:16:44.9832442Z
2023-10-05T22:16:44.9832472Z
2023-10-05T22:16:44.9832496Z
2023-10-05T22:16:44.9836310Z
2023-10-05T22:16:46.5224638Z *** Generic image [mcr.microsoft.com/businesscentral:10.0.20348.1906] not present, skip cleanup
2023-10-05T22:16:46.5228257Z *** Start BC Artifact cleanup
2023-10-05T22:16:46.5341232Z *** ALOps Flush BcContainerHelper Cache [C:\bcartifacts.cache]
2023-10-05T22:16:46.5345852Z *** Cleanup unused Artifacts
2023-10-05T22:16:46.5637970Z * C:\bcartifacts.cache\sandbox\23.0.12034.12863\base (Failed)
2023-10-05T22:16:46.5650599Z * C:\bcartifacts.cache\sandbox\23.0.12034.12863\be (Failed)
2023-10-05T22:16:46.5663269Z * C:\bcartifacts.cache\sandbox\23.0.12034.12863\platform (Failed)
2023-10-05T22:16:46.5677285Z * C:\bcartifacts.cache\sandbox\23.0.12034.12877\be (Failed)
2023-10-05T22:16:46.5690799Z * C:\bcartifacts.cache\sandbox\23.0.12034.12877\platform (Failed)
2023-10-05T22:16:46.5695205Z *** Cleanup extracted VSIX cache
2023-10-05T22:16:46.6280882Z
2023-10-05T22:16:46.6284621Z
2023-10-05T22:16:46.6287826Z
2023-10-05T22:16:46.6291106Z
2023-10-05T22:16:46.6296585Z Cleanup empty folders
2023-10-05T22:16:46.7365810Z
2023-10-05T22:16:46.7369952Z *** BC Artifact cleanup failed on 5 items.
2023-10-05T22:16:46.7374205Z *** Start BC Artifact TempFiles cleanup
2023-10-05T22:16:46.7404052Z *** ALOps Agent Maintenance Finished.
2023-10-05T22:16:46.7408410Z ***
2023-10-05T22:16:46.7458280Z *** Cleanup VSTS Environment: True
2023-10-05T22:16:48.9994116Z ##[section]Finishing: Agent Maintenance
Is it possible there are multiple agents on this server?
(I've lost track of this one, sorry for my late response)
You're onto something here 🤔
There are indeed two agents running on the same machine, against the best pratice of having only one agent for each machine. The difference here is that the second agent is a "release agent" and only executes the ALOpsExtensionAPI@1 and ALOpsAppSource@1.
Mainly the last one (AppSource) is a long running process, where I'm doubting if switched over to microsoft-hosted agents is the best way forward due to the long running time the AppSource process.
Describe the bug We're running daily a maintenance pipeline, where we call the ALOps Agent Maintenance to clean up the bcartifacts.cache folder. There's an error which prevents the clean-up task (and filling up the available storage).
the used yaml please provide the yaml that you used. It helps you put the yaml like this:
the output
Expected behavior Removing the no longer needed folders in the artifacts cache folder.
Additional context