File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
rust/operator-binary/src/csi_server Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,15 @@ All notable changes to this project will be documented in this file.
1717### Fixed
1818
1919- Give RBAC permission to ` delete ` Services, which is needed to set an ownerRef on already existing Services ([ #283 ] ).
20+ - Fix the error "failed to write content: File exists (os error 17)" after a
21+ Node restart ([ #284 ] ).
2022
2123[ #267 ] : https://github.com/stackabletech/listener-operator/pull/267
2224[ #268 ] : https://github.com/stackabletech/listener-operator/pull/268
2325[ #279 ] : https://github.com/stackabletech/listener-operator/pull/279
2426[ #282 ] : https://github.com/stackabletech/listener-operator/pull/282
2527[ #283 ] : https://github.com/stackabletech/listener-operator/pull/283
28+ [ #284 ] : https://github.com/stackabletech/listener-operator/pull/284
2629
2730## [ 24.11.1] - 2025-01-10
2831
Original file line number Diff line number Diff line change @@ -585,18 +585,25 @@ mod pod_dir {
585585 let addr_dir = addrs_path. join ( & addr. address ) ;
586586 let ports_dir = addr_dir. join ( "ports" ) ;
587587 tokio:: fs:: create_dir_all ( & ports_dir) . await ?;
588+ tracing:: info!( "write: {:?}" , addr_dir. join( "address" ) ) ;
588589 tokio:: fs:: write ( addr_dir. join ( "address" ) , addr. address . as_bytes ( ) ) . await ?;
589590 for ( port_name, port) in & addr. ports {
590591 tokio:: fs:: write ( ports_dir. join ( port_name) , port. to_string ( ) . as_bytes ( ) ) . await ?;
591592 }
592593 default_addr_dir. get_or_insert ( addr_dir) ;
593594 }
595+
596+ let default_addr_link = target_path. join ( "default-address" ) ;
597+ // Remove any existing symlink because `tokio::fs::symlink` fails if it already exists.
598+ // This happens if the node was restarted. The pod then restarts with the same UID and
599+ // the pre-populated volume.
600+ let _ = tokio:: fs:: remove_file ( & default_addr_link) . await ;
594601 tokio:: fs:: symlink (
595602 default_addr_dir
596603 . context ( NoDefaultAddressSnafu ) ?
597604 . strip_prefix ( target_path)
598605 . context ( DefaultAddrIsOutsideRootSnafu ) ?,
599- target_path . join ( "default-address" ) ,
606+ & default_addr_link ,
600607 )
601608 . await ?;
602609 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments