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

PWX-31842: PKS mounts-leak fix #1081

Merged
merged 1 commit into from
Jun 26, 2023
Merged

PWX-31842: PKS mounts-leak fix #1081

merged 1 commit into from
Jun 26, 2023

Conversation

zoxpx
Copy link
Collaborator

@zoxpx zoxpx commented Jun 21, 2023

  • mounting changing OSD-mount to -v /var/lib/osd:/var/vcap/store/lib/osd:shared
  • removing offending "pxlogs" (/var/vcap/store/lib/osd/log) mount
  • changing PRE-EXEC to remove the /var/lib/osd/driver directory
  • fixing UTs

What this PR does / why we need it:

ISSUE: the /var/lib/osd + /var/lib/osd/log mounts were causing the "mounts leak" issue on PKS platform

As a fix, we are:

  • we are changing the OSD-mount to /var/vcap/store/lib/osd
  • removing the /var/lib/osd/log mount
  • we had to use PRE-EXEC to remove /var/lib/osd/driver directory, as the pwx.sock file inside causes 2-minute delays for every pxctl command

Which issue(s) this PR fixes (optional)
Closes # PWX-31842

Special notes for your reviewer:

@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (aa69c57) 77.47% compared to head (762abc6) 77.49%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1081      +/-   ##
==========================================
+ Coverage   77.47%   77.49%   +0.02%     
==========================================
  Files          62       62              
  Lines       17086    17083       -3     
==========================================
+ Hits        13237    13239       +2     
+ Misses       2922     2919       -3     
+ Partials      927      925       -2     
Impacted Files Coverage Δ
pkg/migration/generate.go 88.76% <ø> (ø)
drivers/storage/portworx/deployment.go 95.85% <100.00%> (-0.02%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zoxpx zoxpx force-pushed the PWX-31842_pks_mounts-leak_fix branch from 327fcd9 to f3843e8 Compare June 21, 2023 17:58
@@ -51,7 +51,7 @@ spec:
- name: "PX_TEMPLATE_VERSION"
value: "v4"
- name: "PRE-EXEC"
value: "if [ ! -x /bin/systemctl ]; then apt-get update; apt-get install -y systemd; fi"
value: "rm -fr /var/lib/osd/driver"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we don't need the old PRE-EXEC command?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct -- it was added initially to support Ubuntu 14 PKS stemcells, which did not have the systemd package installed. These are "long gone" now -- standard support for Ubuntu 14 LTS version ended beginning of 2019.

@zoxpx zoxpx force-pushed the PWX-31842_pks_mounts-leak_fix branch 2 times, most recently from ccd52c9 to 762abc6 Compare June 23, 2023 19:41
* mounting changing OSD-mount to `-v /var/lib/osd:/var/vcap/store/lib/osd:shared`
* removing offending "pxlogs" (/var/vcap/store/lib/osd/log) mount
* changing `PRE-EXEC` to remove the /var/lib/osd/driver directory
* fixing UTs

Signed-off-by: Zoran Rajic <zrajic@purestorage.com>
@zoxpx
Copy link
Collaborator Author

zoxpx commented Jun 26, 2023

Thanks Piyush -- merging this PR, cherry-picking for px-rel-23.6.0

@zoxpx zoxpx merged commit 8843528 into master Jun 26, 2023
5 checks passed
@zoxpx zoxpx deleted the PWX-31842_pks_mounts-leak_fix branch June 26, 2023 19:32
zoxpx added a commit that referenced this pull request Jun 26, 2023
* mounting changing OSD-mount to `-v /var/lib/osd:/var/vcap/store/lib/osd:shared`
* removing offending "pxlogs" (/var/vcap/store/lib/osd/log) mount
* changing `PRE-EXEC` to remove the /var/lib/osd/driver directory
* fixing UTs

Signed-off-by: Zoran Rajic <zrajic@purestorage.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants