File tree 2 files changed +18
-4
lines changed
2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ default = []
18
18
# If enabled, will create the "local" repository in a subdirectory
19
19
# of the standard storage root, named "ci/pipeline_${CI_PIPELINE_ID}".
20
20
gitlab-ci-local-repo-isolation = []
21
+ # Use "mount" commands that are compatible with older centos7-era kernels that
22
+ # do not support the "lowerdir+=" overlayfs options. "legacy-mount-options"
23
+ # can run into path length limits when mounting many layers.
24
+ # https://github.com/spkenv/spk/issues/968
25
+ legacy-mount-options = []
21
26
sentry = [" dep:sentry" ]
22
27
server = [" hyper/server" , " tokio-util/codec" , " tokio-util/io-util" ]
23
28
"protobuf-src" = [" dep:protobuf-src" ]
Original file line number Diff line number Diff line change @@ -1126,10 +1126,19 @@ pub(crate) fn get_overlay_args<P: AsRef<Path>>(
1126
1126
// the rightmost on the command line is the bottom layer, and the
1127
1127
// leftmost is on the top). For more details see:
1128
1128
// https://docs.kernel.org/filesystems/overlayfs.html#multiple-lower-layers
1129
- args. push_str ( "lowerdir=" ) ;
1130
- for path in layer_dirs. iter ( ) . rev ( ) {
1131
- args. push_str ( & path. as_ref ( ) . to_string_lossy ( ) ) ;
1132
- args. push ( ':' ) ;
1129
+ if cfg ! ( feature = "legacy-mount-options" ) {
1130
+ args. push_str ( "lowerdir=" ) ;
1131
+ for path in layer_dirs. iter ( ) . rev ( ) {
1132
+ args. push_str ( & path. as_ref ( ) . to_string_lossy ( ) ) ;
1133
+ args. push ( ':' ) ;
1134
+ }
1135
+ } else {
1136
+ for path in layer_dirs. iter ( ) . rev ( ) {
1137
+ args. push_str ( "lowerdir+=" ) ;
1138
+ args. push_str ( & path. as_ref ( ) . to_string_lossy ( ) ) ;
1139
+ args. push ( ',' ) ;
1140
+ }
1141
+ args. push_str ( "lowerdir+=" ) ;
1133
1142
}
1134
1143
args. push_str ( & rt. config . lower_dir . to_string_lossy ( ) ) ;
1135
1144
You can’t perform that action at this time.
0 commit comments