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

Hosting Bundle installer removes RC version of 2.1.0, breaking all RC apps #1655

Closed
dasMulli opened this issue Jun 4, 2018 · 20 comments
Closed
Assignees

Comments

@dasMulli
Copy link

dasMulli commented Jun 4, 2018

Issue Title

The Hosting Bundle Installer of .NET Core 2.1.0 removes the 2.1.0-rc1 version of the ASP.NET Core shared frameworks (shared framework M.NetCore.App 2.1.0-rc1 is still left), thus breaking every ASP.NET Core 2.1.0-rc1 app on the system since there is no roll-forward from RC to RTM.

Steps to reproduce

(EDIT) Repro system: Windows Server 2016, no prior .NET Core installations

  1. Install hosting bundle installer for 2.1.0-rc1
  2. Deploy 2.1.0-rc1 apps to the system (e.g. using Microsoft.AspNetCore.All sharedfx)
  3. Install hosting bundle installer for 2.1.0 RTM
  4. Observe that the 2.1.0-rc1 apps break and are no longer able to run.

Expected behavior

The RTM hosting bundle shall not uninstall previous version of the shared framework for which there is no roll-forward logic in hostfxr.

cc @leecow @natemcmaster (don't know whom to /cc)

@dasMulli
Copy link
Author

dasMulli commented Jun 4, 2018

I really do appreciate that the installer tries to remove old versions (hope that the 2.1.1 installer will remove 2.1.0), but please don't remove versions for which there is no roll-forward logic.

@markusschaber
Copy link

Removing the old versions could be optional in the installer...

@natemcmaster
Copy link
Contributor

cc @joeloff

@joeloff
Copy link
Member

joeloff commented Jun 4, 2018

I'll take a look.

@leecow
Copy link
Member

leecow commented Jun 4, 2018

The RC-final package should not be uninstalled by the 2.1.0 because RC was prior to our implementing the package name and versioning updates to enable updates. So not sure what might be going on.

Package name and versions of RC and GA should have no interaction by the package manager.

$rpm -qip aspnetcore-runtime-2.1.0-x64.rpm 
Name        : aspnetcore-runtime-2.1
Version     : 2.1.0

$rpm -qip aspnetcore-runtime-2.1.0-rc1-final-x64.rpm 
Name        : aspnetcore-runtime-2.1.0-rc1-final
Version     : 2.1.0_rc1_final

My install test on Fedora 28 correctly retained RC1 after installing GA.

leecow at fedora-28 in [/usr/share/dotnet]
$find . -maxdepth 3 -type d -iname 2*
./shared/Microsoft.AspNetCore.All/2.1.0-rc1-final
./shared/Microsoft.NETCore.App/2.1.0-rc1
./shared/Microsoft.AspNetCore.App/2.1.0-rc1-final
./host/fxr/2.1.0-rc1

leecow at fedora-28 in [/usr/share/dotnet]
$sudo dnf install aspnetcore-runtime-2.1
[sudo] password for leecow: 
Last metadata expiration check: 0:50:29 ago on Mon 04 Jun 2018 09:03:39 AM PDT.
Dependencies resolved.
====================================================================================================
 Package                      Arch         Version          Repository                         Size
====================================================================================================
Installing:
 aspnetcore-runtime-2.1       x86_64       2.1.0-1          packages-microsoft-com-prod        29 M
Installing dependencies:
 dotnet-hostfxr-2.1           x86_64       2.1.0-1          packages-microsoft-com-prod       195 k
 dotnet-runtime-2.1           x86_64       2.1.0-1          packages-microsoft-com-prod        27 M

Transaction Summary
====================================================================================================
Install  3 Packages

Total download size: 56 M
Installed size: 56 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): dotnet-hostfxr-2.1.0-x64.rpm                                  37 kB/s | 195 kB     00:05    
(2/3): aspnetcore-runtime-2.1.0-x64.rpm                             2.9 MB/s |  29 MB     00:09    
(3/3): dotnet-runtime-2.1.0-x64.rpm                                 2.6 MB/s |  27 MB     00:10    
----------------------------------------------------------------------------------------------------
Total                                                               5.4 MB/s |  56 MB     00:10     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                            1/1 
  Installing       : dotnet-hostfxr-2.1-2.1.0-1.x86_64                                          1/3 
  Installing       : dotnet-runtime-2.1-2.1.0-1.x86_64                                          2/3 
  Installing       : aspnetcore-runtime-2.1-2.1.0-1.x86_64                                      3/3 
  Verifying        : aspnetcore-runtime-2.1-2.1.0-1.x86_64                                      1/3 
  Verifying        : dotnet-runtime-2.1-2.1.0-1.x86_64                                          2/3 
  Verifying        : dotnet-hostfxr-2.1-2.1.0-1.x86_64                                          3/3 

Installed:
  aspnetcore-runtime-2.1.x86_64 2.1.0-1              dotnet-hostfxr-2.1.x86_64 2.1.0-1             
  dotnet-runtime-2.1.x86_64 2.1.0-1                 

Complete!
leecow at fedora-28 in [/usr/share/dotnet]
$find . -maxdepth 3 -type d -iname 2*
./shared/Microsoft.AspNetCore.All/2.1.0-rc1-final
./shared/Microsoft.AspNetCore.All/2.1.0
./shared/Microsoft.NETCore.App/2.1.0-rc1
./shared/Microsoft.NETCore.App/2.1.0
./shared/Microsoft.AspNetCore.App/2.1.0-rc1-final
./shared/Microsoft.AspNetCore.App/2.1.0
./host/fxr/2.1.0-rc1
./host/fxr/2.1.0

@dasMulli
Copy link
Author

dasMulli commented Jun 4, 2018

@leecow thanks for investigating.

My repo steps were done on Windows Server 2016 using the hosting bundle installer. (repro'd with a win2016 server instance that has never seen a .net core install before)

If I install the asp.net core shared framework installers themselves, nothing bad happens. What I did on the machine that had broken apps was install the rc1 shared framework installers to fix the broken apps.

Nothing bad happened other than nearly busting a demo meeting with a customer (and luckily I knew what was broken from the error message)

@dasMulli
Copy link
Author

dasMulli commented Jun 4, 2018

Just opening this now in hope that it doesn't happen again for 2.2 / 3.0

@leecow
Copy link
Member

leecow commented Jun 4, 2018

Thanks for the Windows platform clarification. @joeloff will have a look at that side of things.

@joeloff
Copy link
Member

joeloff commented Jun 4, 2018

I'm setting up a repro machine. I looked at the individual installers and the MSIs have separate upgrade codes so they should install SxS. However, if the hosting bundle itself is designed for upgrade, regardless of what the individual installers do, bundles will uninstall the previous copy (and bundled installers) if it performs an upgrade.

@dasMulli
Copy link
Author

dasMulli commented Jun 4, 2018

That's indeed great(!) as long as it doesn't break things that don't roll-forward in the host.

Previously, the 1., 2.0. hosting bundles installed SxS well, I only ever installed hosting bundles on servers.

To clarify: It only affects the asp.net core shared frameworks. The 2.1.0-rc1 microsoft.netcore.app shared fx is still there, only the rc1 asp.not core shard frameworks were uninstalled (Microsoft.AspNetCore.App ad .All).

@joeloff
Copy link
Member

joeloff commented Jun 4, 2018

OK, I can confirm that the hosting bundle is marked for upgrade instead of SxS. I'll send a PR to get this fixed.

@leecow
Copy link
Member

leecow commented Jun 14, 2018

@joeloff - can you confirm the work on your side is done? If so, I'll close this issue.

@joeloff
Copy link
Member

joeloff commented Jun 14, 2018

We haven't done this yet. We have a setup meeting later today to discuss

@joeloff
Copy link
Member

joeloff commented Jun 14, 2018

@muratg and I chatted. We're going to get this in the next patch for 2.1 and 2.2 will have the fix as well.

@dasMulli
Copy link
Author

The windows hosting bundle installer for 2.1.1 at https://github.com/dotnet/versions/tree/7a833dddfddc27f2074b755b94234a25b9757637/build-info/dotnet/product/cli/release/2.1 installs the 2.1.1 asp.net core shared frameworks side-by-side with 2.1.0.
So it appears the ref counting behavior only affected moving from rc to rtm.

@leecow
Copy link
Member

leecow commented Jun 22, 2018

@joeloff - is there a github issue we can reference then close this one?

@leecow
Copy link
Member

leecow commented Jun 22, 2018

Issue is now tracking in the hosting bundle repo.

@leecow leecow closed this as completed Jun 22, 2018
@poke
Copy link

poke commented Jun 22, 2018

@leecow Can you link the new issue?

@leecow
Copy link
Member

leecow commented Jun 22, 2018

@poke - it's aspnet/WindowsHostingBundle#22. Unfortunately the repo is private.

@dasMulli
Copy link
Author

Unfortunately the repo is private.

sad panda

But I'm glad to see that the issue is tracked and being worked on. Thanks @leecow and @joeloff!

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

No branches or pull requests

6 participants