-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
CODENVY-457: fix NPE when swarm doesn't detect container death #1344
Conversation
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
throw e; | ||
} | ||
Map<String, List<PortBinding>> ports = info.getNetworkSettings().getPorts(); | ||
Map<String, String> labels = info.getConfig().getLabels(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure getNetworkSettings and getConfig are not null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like they are never null whereas ports field is null when container is not running
ok |
@skabashnyuk Please take a look |
// Hack needed to investigate why swarm returns invalid response | ||
LOG.error(info.toString()); | ||
throw e; | ||
Map<String, List<PortBinding>> ports = Collections.emptyMap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that Collections.emptyMap shouldn't be created in the else block ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ok |
will it be backported to 4.3.x as well ? replacing/updating #1312 |
yes/yes |
nice to see this NPE gone |
Build # 696 - FAILED Please check console output at http://ci.codenvy-dev.com/jenkins/job/che-pullrequests-build/696/ to view the results. |
@skabashnyuk Please review