File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
crates/stackable-operator/src/builder/pod Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,11 @@ pub enum Error {
28
28
} ,
29
29
30
30
#[ snafu( display(
31
- "Colliding mountPath {mount_path :?} in volumeMounts with different content. \
31
+ "Colliding mountPath {colliding_mount_path :?} in volumeMounts with different content. \
32
32
Existing volume name {existing_volume_name:?}, new volume name {new_volume_name:?}"
33
33
) ) ]
34
34
MountPathCollision {
35
- mount_path : String ,
35
+ colliding_mount_path : String ,
36
36
existing_volume_name : String ,
37
37
new_volume_name : String ,
38
38
} ,
@@ -234,7 +234,7 @@ impl ContainerBuilder {
234
234
) ;
235
235
236
236
MountPathCollisionSnafu {
237
- mount_path : & volume_mount . mount_path ,
237
+ colliding_mount_path ,
238
238
existing_volume_name : & existing_volume_mount. name ,
239
239
new_volume_name : & volume_mount. name ,
240
240
}
Original file line number Diff line number Diff line change @@ -52,8 +52,10 @@ pub enum Error {
52
52
#[ snafu( display( "object is missing key {key:?}" ) ) ]
53
53
MissingObjectKey { key : & ' static str } ,
54
54
55
- #[ snafu( display( "Colliding volume name {volume_name:?} in volumes with different content" ) ) ]
56
- VolumeNameCollision { volume_name : String } ,
55
+ #[ snafu( display(
56
+ "Colliding volume name {colliding_volume_name:?} in volumes with different content"
57
+ ) ) ]
58
+ VolumeNameCollision { colliding_volume_name : String } ,
57
59
}
58
60
59
61
/// A builder to build [`Pod`] or [`PodTemplateSpec`] objects.
@@ -292,16 +294,16 @@ impl PodBuilder {
292
294
pub fn add_volume ( & mut self , volume : Volume ) -> Result < & mut Self > {
293
295
if let Some ( existing_volume) = self . volumes . get ( & volume. name ) {
294
296
if existing_volume != & volume {
295
- let colliding_name = & volume. name ;
297
+ let colliding_volume_name = & volume. name ;
296
298
// We don't want to include the details in the error message, but instead trace them
297
299
tracing:: error!(
298
- colliding_name ,
300
+ colliding_volume_name ,
299
301
?existing_volume,
300
- "Colliding volume name {colliding_name :?} in volumes with different content"
302
+ "Colliding volume name {colliding_volume_name :?} in volumes with different content"
301
303
) ;
302
304
303
305
VolumeNameCollisionSnafu {
304
- volume_name : & volume . name ,
306
+ colliding_volume_name ,
305
307
}
306
308
. fail ( ) ?;
307
309
}
You can’t perform that action at this time.
0 commit comments