microsoft / nav-docker

Official Microsoft repository for Dynamics NAV in Docker resources. It has not been decided yet, to which extend Microsoft will ship Docker images with NAV, so everything in this repo is work in progress and might be subject to deletion.
MIT License
180 stars 91 forks source link

Issue with Delete Company #204

Closed AlphaGeeKUK closed 6 years ago

AlphaGeeKUK commented 6 years ago

Set up a container, create a new or copy of Cronus company then delete it.

It is removed from the list of companies in NAV, but the SQL tables are never deleted.

It's probably something to do with the lazy delete being done by some scheduled task that is not running in the container.

Anyone know what the task is and how to start it?

freddydk commented 6 years ago

Are you using Windows Auth or NavUserPassword auth? Reason for asking is, that I know that the task scheduler in NAV doesn't work in Docker when running Windows Auth. We have somebody looking into this.

AlphaGeeKUK commented 6 years ago

It's using NavUserPassword auth.

freddydk commented 6 years ago

Just tried this using the microsoft/bcsandbox:de container with both Windows and NavUserPassword auth. - works fine. Need more info.

AlphaGeeKUK commented 6 years ago

Hi Freddy,

It's using microsoft/dynamics-nav:2018-gb container. It had CU4 in the image when I deployed it.

AlphaGeeKUK commented 6 years ago

I should add it was deployed via the ARM templates (aka.ms/getnav)

freddydk commented 6 years ago

Yeah, the more info the less time is wasted:-) I can repro this with NAV 2018 - but not with bcsandbox. I will ask around

freddydk commented 6 years ago

This should be fixed in Cu6 - which was created on docker a few days ago. Haven't tested myself yet.

AlphaGeeKUK commented 6 years ago

Hi Freddy, thanks. I'll spin a new one up and test it.

AlphaGeeKUK commented 6 years ago

I created a new VM via the ARM templates (aka.ms/getnav) for 2018 CU GB, copied Cronus company to a new one, deleted it, looked in SSMS and the copy company tables are still there.

I'm not sure how long the 'lazy' delete is supposed to take, but I'll look again in the morning.

AlphaGeeKUK commented 6 years ago

The company delete via the NAV client still has the tables in the database this morning,

freddydk commented 6 years ago

Ok, will have to go back to the team.

freddydk commented 6 years ago

I think I know what is wrong here. The TaskScheduler is disabled by default in NAV 2018 containers and earlier. You can add this as additionalparameter to new-navcontainer --env CustomNavSettings=EnableTaskScheduler=true Which should do the trick. I will an option to start the task scheduler in the arm templates (aka.ms/getnav)

freddydk commented 6 years ago

Just tried this with a NAV 2018 container and it solves the problem.