aws-samples / amazon-k8s-node-drainer

Gracefully drain Kubernetes pods from EKS worker nodes during autoscaling scale-in events.
Other
199 stars 57 forks source link

Failure in step "sam build --use-container --skip-pull-image" #32

Closed XiaoYangZhu closed 4 years ago

XiaoYangZhu commented 4 years ago

When follow this guide for the sam build, below issue occured:

demo-user:~/environment/amazon-k8s-node-drainer (master) $ sam build --use-container --skip-pull-image Starting Build inside a container Building resource 'DrainerFunction'

Fetching lambci/lambda:build-python3.7 Docker container image................................................................................................................................................. Mounting /home/ec2-user/environment/amazon-k8s-node-drainer/drainer as /tmp/samcli/source:ro,delegated inside runtime container Traceback (most recent call last): File "/usr/local/bin/sam", line 11, in sys.exit(cli()) File "/usr/local/lib64/python3.6/site-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/usr/local/lib64/python3.6/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib64/python3.6/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib64/python3.6/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib64/python3.6/site-packages/click/core.py", line 555, in invoke return callback(args, kwargs) File "/usr/local/lib64/python3.6/site-packages/click/decorators.py", line 64, in new_func return ctx.invoke(f, obj, *args, *kwargs) File "/usr/local/lib64/python3.6/site-packages/click/core.py", line 555, in invoke return callback(args, kwargs) File "/usr/local/lib/python3.6/site-packages/samcli/lib/telemetry/metrics.py", line 93, in wrapped raise exception # pylint: disable=raising-bad-type File "/usr/local/lib/python3.6/site-packages/samcli/lib/telemetry/metrics.py", line 62, in wrapped return_value = func(*args, **kwargs) File "/usr/local/lib/python3.6/site-packages/samcli/commands/build/command.py", line 127, in cli mode, File "/usr/local/lib/python3.6/site-packages/samcli/commands/build/command.py", line 192, in do_cli artifacts = builder.build() File "/usr/local/lib/python3.6/site-packages/samcli/lib/build/app_builder.py", line 104, in build lambda_function.runtime) File "/usr/local/lib/python3.6/site-packages/samcli/lib/build/app_builder.py", line 195, in _build_function runtime) File "/usr/local/lib/python3.6/site-packages/samcli/lib/build/app_builder.py", line 267, in _build_function_on_container container.wait_for_logs(stdout=stdout_stream, stderr=stderr_stream) File "/usr/local/lib/python3.6/site-packages/samcli/local/docker/container.py", line 197, in wait_for_logs raise RuntimeError("Container does not exist. Cannot get logs for this container") RuntimeError: Container does not exist. Cannot get logs for this container demo-user:~/environment/amazon-k8s-node-drainer (master) $

svozza commented 4 years ago

What version of SAM are you using and what OS?

svozza commented 4 years ago

I'm going to close this as the issue has been open for quite some time, please reopen if you wish to continue with any investigation.