[LU-17128] lnet.service file not created on Ubuntu 22.04 client Created: 18/Sep/23  Updated: 10/Nov/23  Resolved: 28/Sep/23

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.16.0, Lustre 2.15.4
Fix Version/s: Lustre 2.16.0

Type: Bug Priority: Minor
Reporter: Jian Yu Assignee: Jian Yu
Resolution: Fixed Votes: 0
Labels: ubuntu

Issue Links:
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The lnet.service file was in the lustre-client-utils package built on Ubuntu 20.04:

# dpkg -c lustre-client-utils_2.15.3-22-g8299b3f-1_amd64.deb | grep 'lnet.service'
-rw-r--r-- root/root       412 2023-08-02 06:43 ./lib/systemd/system/lnet.service

but it was missing from the package built on Ubuntu 22.04:

# dpkg -c lustre-client-utils_2.15.58-40-gc1ebcb0-1_amd64.deb | grep 'lnet.service'

By comparing the build logs, I found the following differences:
On Ubuntu 20.04:

Enabled Build Profiles: client systemd

And on Ubuntu 22.04:

Enabled Build Profiles: noudeb

Something was changed on Ubuntu 22.04.
After looking into the source codes of dpkg-buildpackage, I found the "noudeb" build profile was set to the environment variable DEB_BUILD_PROFILES by default in /usr/share/perl5/Dpkg/BuildProfiles.pm and /usr/share/perl5/Dpkg/Vendor/Ubuntu.pm. This change was introduced by dpkg version 1.21.1ubuntu2.1 installed by default on Ubuntu 22.04.
Another issue is in dpkg-buildpackage. It calls set_build_profiles(@build_profiles) directly without checking if @build_profiles is empty. This will always override DEB_BUILD_PROFILES with "noudeb" if build profiles are not explicitly specified to dpkg-buildpackage via -P|--build-profiles option.



 Comments   
Comment by Gerrit Updater [ 18/Sep/23 ]

"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52404
Subject: LU-17128 build: fix lnet.service missing issue on Ubuntu 22.04
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: f5e51a2dc0dcb8de3624d86c724165a487b7946c

Comment by Gerrit Updater [ 28/Sep/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52404/
Subject: LU-17128 build: fix lnet.service missing issue on Ubuntu 22.04
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 3b759ecbe28e6c5340d4a2a73bc61c34485885c5

Comment by Peter Jones [ 28/Sep/23 ]

Landed for 2.16

Generated at Sat Feb 10 03:32:52 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.