Comments (13)
@Bonczidai did you have in the logs "session is down"??
from cs-content.
no, not this time
from cs-content.
another situation when session is down
appears - see log: http://codeviewer.org/view/code:4fd0
from cs-content.
tasks:
- loop_docker_images_maintenance
- - - check_diskspace
- - - - - validate_linux_machine_ssh_access
- - - - - check_disk_space
- - - - - check_availability
- - - clear_unused_docker_images
- - - - - clear_docker_images
- - - - - - - validate_linux_machine_ssh_access
- - - - - - - get_all_images
- - - - - - - get_used_images
- - - - - - - - - validate_linux_machine_ssh_access_op
- - - - - - - - - get_used_images
- - - - - - - subtract_used_images
- - - - - - - verify_all_images_list_not_empty
- - - - - - - verify_used_images_list_not_empty
- - - - - - - get_parent_images
- - - - - - - - - validate_linux_machine_ssh_access
- - - - - - - - - inspect_image
- - - - - - - - - get_parent
- - - - - - - - - get_parent_name
- - - - - - - substract_parent_images
- - - - - - - delete_images
Command failed java.lang.RuntimeException: Slang Error : Error running: 'clear_unused_docker_images': Error binding output: 'total_amount',
Error is: Error in running script expression or variable reference, for expression: 'amount_of_images_deleted + amount_of_dangling_images_deleted',
Script exception is: javax.script.ScriptException: TypeError: unsupported operand type(s) for +: 'int' and 'NoneType' in <script> at line number 1
from cs-content.
CALL_ARGUMENTS={privateKeyFile=/root/cloudslang-coreos, port=22, closeSession=false, username=core, arguments=, host=188.166.102.7, characterSet=UTF-8, pty=false, command= , password=, timeout=6000000}, PATH=0/2/0/2/0/1/0/3/0/1/0/0, TIMESTAMP=Wed Apr 22 07:54:31 EDT 2015, TYPE=EVENT_ACTION_START}
2015-04-22 07:54:32:562 628858 [WorkerExecutionThread-1_101600008] INFO io.cloudslang.lang.cli.SlangCLI - Event received: EVENT_ACTION_END Data is: {EXECUTIONID=101600008, DESCRIPTION=Action performed, PATH=0/2/0/2/0/1/0/3/0/1/0/0, RETURN_VALUES={returnCode=-1, returnResult=, STDERR=, STDOUT=}, TIMESTAMP=Wed Apr 22 07:54:32 EDT 2015, TYPE=EVENT_ACTION_END}
{EXECUTIONID=101600008, DESCRIPTION=Action performed, PATH=0/2/0/2/0/1/0/3/0/1/0/0, RETURN_VALUES={returnCode=-1, returnResult=, STDERR=, STDOUT=}
@Bonczidai I told you the timeout needs to be higher. Otherwise the SSHActionCommand fails with no notice. When the step fails, the flow tries to bind whatever outputs it has, and the ones it needs do not exist because of the failure.
I tried with timeout 90000000 and it worked for me. Not 100% sure whether or not it's the timeout,but it's definitely a content issue.
from cs-content.
@Bonczidai for the one you posted here: http://codeviewer.org/view/code:4fd0
RETURN_VALUES={returnCode=-1, returnResult=, STDERR=, STDOUT=Untagged: busybox:latest
Deleted: 4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125
Deleted: ea13149945cb6b1e746bf28032f02e9b5a793523481a0a18645fc77ad53c4ea2}
Same issue. Timeout is 6000000, flow reaches SSHActionCommand, it actually removes images, but returnCode=-1 so step fails => parent flow can't bind outputs anymore.
from cs-content.
seems that it failed with higher timeout as well. still the SSH though
from cs-content.
what you mean by "still the SSH though"?? is it "session is down" issue?
from cs-content.
@meirwah from what I observed, the SSH fails sometimes without having the "session is down" error. In the comment I wrote above you can see, the STDOUT contains deleted docker images, while the returnCode=-1 which fails the flow. So SSH can fail having the "session is down" message, no error message at all with valid STDOUT and no information besides returnCode-1. The thing is, everytime @Bonczidai posted a flow failure, I looked over the logs and the SSHCommandAction had returnCode=-1 while everything else being valid.
from cs-content.
@tudorlesan , please try to either Debug the java action and/or consult content team about this
from cs-content.
I think I understand the issue, in the flow "get_used_images_flow" the flow fails because of SSH connection (validate_linux_machine_ssh_access step, on -1), then it will try to resolve parent flow (clear_docker_images_flow) output (amount_of_images_deleted) :
'0 if 'images_list_safe_to_delete' in locals() and images_list_safe_to_delete == '' else amount_of_images'
but amount_of_images does not exist since we did not get to the task that deletes it...
We either need to verify in the expression amount_of_images is in locals , or look for this outputs only if result=0...
from cs-content.
This happens in more places(not only in "get_used_images_flow") depending on where the SSH fails as I wrote above. I realized that avoiding those errors is possible with more validation. But the problem is, the flow will fail either way. The images will not be deleted because SSH fails. And not having those errors there might cause confusion as to why the flow actually failed.
Either way, unless I find the problem with the SSH, we will not be sure how many runs of the flow will actually do what we expect it to do.
from cs-content.
Not reproducable
from cs-content.
Related Issues (20)
- Flow io.cloudslang.vmware.vcenter.virtual_machines.clone_virtual_machine cannot create VMs in sub-folders
- Flow io.cloudslang.vmware.vcenter.virtual_machines.get_virtual_machine_details does not retrieve IP address when VM just powered on HOT 1
- Flow io.cloudslang.base.comparisons.equals does not accept an empty parameter HOT 1
- json based operation add_value.sl requires comma separated json path
- entit copyright header is being added automatically HOT 1
- broken gitter URL on cs-content HOT 1
- docker mysql tests are failing HOT 1
- AwsSignatureHelper.getAmazonRegion() method does not count with https protocol HOT 1
- Operation io.cloudslang.base.lists.add_element.sl does not allow empty input parameters (empty list, empty element)
- get_value and get_keys operations from io.cloudslang.base.json fail
- Getting a prompt window/validation error for template_body
- cs-utilities:0.1.22 is not present in maven central thus a lot of base content cannot be actually used
- Add noop
- Build should fail if new uncovered items are introduced HOT 1
- default SSH operation to Brocade device unable to send commands to login shell HOT 2
- get_access_token.sl from google compute should be moved to a different folder
- Extra level should be placed under compute for the google cloud content
- CoreOS test temporarily ignored - readd to test suites
- Unable to create VMs in a non-default AWS EC2 region HOT 1
- Action io/cloudslang/base/remote_file_transfer/remote_secure_copy.sl does not support HTTP proxy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cs-content.