You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2018/10/24 14:50:28 UTC
[1/3] storm git commit: STORM-3272 allow worker-launcher to delete
dead symlinks
Repository: storm
Updated Branches:
refs/heads/master 4d7099f3c -> 441f21039
STORM-3272 allow worker-launcher to delete dead symlinks
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/13134477
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/13134477
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/13134477
Branch: refs/heads/master
Commit: 131344777ae4cbc4ca47952b3a95f35b11713f23
Parents: e2563a1
Author: Aaron Gresch <ag...@yahoo-inc.com>
Authored: Tue Oct 23 08:57:52 2018 -0500
Committer: Aaron Gresch <ag...@yahoo-inc.com>
Committed: Tue Oct 23 09:00:38 2018 -0500
----------------------------------------------------------------------
.../src/native/worker-launcher/impl/worker-launcher.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/13134477/storm-core/src/native/worker-launcher/impl/worker-launcher.c
----------------------------------------------------------------------
diff --git a/storm-core/src/native/worker-launcher/impl/worker-launcher.c b/storm-core/src/native/worker-launcher/impl/worker-launcher.c
index 02c0bec..d085315 100644
--- a/storm-core/src/native/worker-launcher/impl/worker-launcher.c
+++ b/storm-core/src/native/worker-launcher/impl/worker-launcher.c
@@ -593,14 +593,17 @@ int recursive_delete(const char *path, int supervisor_owns_dir) {
return UNABLE_TO_BUILD_PATH;
}
+ struct stat file_stat;
+
if(access(path, F_OK) != 0) {
if(errno == ENOENT) {
- return 0;
- }
- // Can probably return here, but we'll try to lstat anyway.
- }
+ // we need to handle symlinks that target missing files.
+ if((lstat(path, &file_stat) != 0) || ((file_stat.st_mode & S_IFMT) != S_IFLNK)) {
+ return 0;
+ }
+ }
+ }
- struct stat file_stat;
if(lstat(path, &file_stat) != 0) {
fprintf(LOGFILE, "Failed to delete %s: %s", path, strerror(errno));
return UNABLE_TO_STAT_FILE;
[2/3] storm git commit: STORM-3272 log stat failure
Posted by bo...@apache.org.
STORM-3272 log stat failure
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/3fe00213
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/3fe00213
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/3fe00213
Branch: refs/heads/master
Commit: 3fe0021379c1b491bc45bd5cc8efbc91cedd8536
Parents: 1313447
Author: Aaron Gresch <ag...@yahoo-inc.com>
Authored: Tue Oct 23 09:59:35 2018 -0500
Committer: Aaron Gresch <ag...@yahoo-inc.com>
Committed: Tue Oct 23 09:59:35 2018 -0500
----------------------------------------------------------------------
storm-core/src/native/worker-launcher/impl/worker-launcher.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/3fe00213/storm-core/src/native/worker-launcher/impl/worker-launcher.c
----------------------------------------------------------------------
diff --git a/storm-core/src/native/worker-launcher/impl/worker-launcher.c b/storm-core/src/native/worker-launcher/impl/worker-launcher.c
index d085315..5155ed8 100644
--- a/storm-core/src/native/worker-launcher/impl/worker-launcher.c
+++ b/storm-core/src/native/worker-launcher/impl/worker-launcher.c
@@ -597,8 +597,12 @@ int recursive_delete(const char *path, int supervisor_owns_dir) {
if(access(path, F_OK) != 0) {
if(errno == ENOENT) {
+ if(lstat(path, &file_stat) != 0) {
+ fprintf(LOGFILE, "Failed to stat %s: %s", path, strerror(errno));
+ return 0;
+ }
// we need to handle symlinks that target missing files.
- if((lstat(path, &file_stat) != 0) || ((file_stat.st_mode & S_IFMT) != S_IFLNK)) {
+ if((file_stat.st_mode & S_IFMT) != S_IFLNK) {
return 0;
}
}
[3/3] storm git commit: Merge branch 'agresch_storm-3272' of
https://github.com/agresch/storm into STORM-3272
Posted by bo...@apache.org.
Merge branch 'agresch_storm-3272' of https://github.com/agresch/storm into STORM-3272
STORM-3272: allow worker-launcher to delete dead symlinks
This closes #2893
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/441f2103
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/441f2103
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/441f2103
Branch: refs/heads/master
Commit: 441f2103905979605d5586c3bc8fa04fee4fd31e
Parents: 4d7099f 3fe0021
Author: Robert Evans <ev...@yahoo-inc.com>
Authored: Wed Oct 24 09:26:40 2018 -0500
Committer: Robert Evans <ev...@yahoo-inc.com>
Committed: Wed Oct 24 09:26:40 2018 -0500
----------------------------------------------------------------------
.../native/worker-launcher/impl/worker-launcher.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------