.NET Applications Prior to Version 6 May Encounter Compatibility Issues on Jammy-Based Diego Cells
search cancel

.NET Applications Prior to Version 6 May Encounter Compatibility Issues on Jammy-Based Diego Cells

book

Article ID: 298178

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

This Knowledge Base (KB) article aims to highlight the possibility of unexpected behavior in .NET applications developed with SDK version 5 or earlier, deployed on Ubuntu Jammy Stemcell-based Diego Cells within Tanzu Application Service (TAS).

Jammy Stemcells encapsulate Ubuntu 22.04. According to Microsoft documentation, .NET 8, .NET 7, and .NET 6, are supported on Ubuntu 22.04. While .NET applications developed with SDK version 5 or earlier are capable of operating on Diego Cells utilizing Ubuntu Jammy Stemcells, it is possible that unforeseen issues may be observed. 

One such issue is writing to a Tanzu SMB volume services mounted SMB share. It was recently discovered that .NET apps built on SDK version 5 or earlier can no longer write to SMB shares mounted to the container of a Jammy Stemcell-based Diego Cell. The SMB share is set up correctly for the container and everything is connected properly. However, the application encounters a permission error when it attempts to write to the share:
   2024-02-14T20:11:48.13+0000 [APP/PROC/WEB/0] OUT System.UnauthorizedAccessException: Access to the path '/mysmb/myfilename' is denied.
   2024-02-14T20:11:48.13+0000 [APP/PROC/WEB/0] OUT ---> System.IO.IOException: Permission denied

The discovery of this issue occurred during the transition of a .NET 3.1 application from TAS 2.11 to TAS 4. Despite the upgrade, there were no changes to the container stack, the buildpack remained the same, and the application did not undergo restaging, ensuring that the application's droplet remained unchanged. However, when running on Ubuntu Jammy Stemcell-based Diego Cells, the application encounters the previously mentioned permission error while attempting to write to the filesystem. In a supplementary test, the SMB share was removed and replaced with a regular directory in the filesystem at the same mount point previously occupied by the SMB. Following this adjustment, writing operations by the application proceeded without issue, indicating that the problem is unique to SMB-mounted shares. Further investigations revealed that upgrading to .NET 6 or higher resolves the writing issue altogether, highlighting that the issue arises specifically with applications built using .NET 5 or lower when interacting with SMB-mounted shares. This situation is likely due to updates in the kernel modules for CIFS between Xenial and Jammy-based stemcells.

Environment

Product Version: 4.0

Resolution

The recommended solutions may include:
  • Upgrade the application to .NET 6 or above from .NET 5 or earlier.
  • Modify the application logic based on the issue it is facing.