-
Notifications
You must be signed in to change notification settings - Fork 100
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
Dockerization of nos3 #35
Comments
Okay, I've refactored how we were building to be more in-line with the vagrant build...
After checking the '/proc/sys/fs/mqueue/msg_max' of the container, I see that it is 10, even though the host docker system is set to 100. I cannot seem to modify on the running container (read only filesystem). I had been playing around (between the old build and the new) and thought I had actually gotten it running once, but I have not been able to replicate on a clean build... Could it be related to "nasa/osal#285" or "nasa/osal#235"? |
Using Docker with cFS can produce some difficulties if the docker images are not just right or the containers are not correctly spun up. Docker exists as an isolated user space; you'll want to make sure to get the correct resources from the OS upon the container's initialization or else you may run into some issues like the ones you are seeing. IIRC, there is a flag you need to give Docker containers to make sure it got the correct number of mqueues. Once in the container you may not be able to set the OS mqueues like you normally might from general userspace with sudo. Some other general tips: Do not run cFS root. You can, but you ought to be able to do anything you want to do with it without root privilege. Root can produce a number of issues, one of which is the unreleased shared memory segment. To properly run cFS you'll need to make sure you have the right number of mqueues. If you want to check, you might have old mqueues locked in your OS from an incorrect termination of a (usually a root cFS) past cFS instance where you'll need to clear the mqueues manually from your OS before your next run. Additionally, you may need to run cFS with PR Reset flag. You can definitely run cFS in Docker and have it interact with other pieces. I do recommend, if you are putting many pieces into containers, that you establish a Docker Network for the pieces to use between themselves. I hope this helps! |
okay, I figured a way to update the mqueue size of the container, which got me past the problem above and it looks like it is running now. |
@cmanderino, thanks, I appreciate the response! Yeah, you can't change the mqueue size once the container is create and I had seen the warning about running cFS as root, that was why I stepped back to re-align what had been done previously. Breaking into multiple containers and running in a named network is a next/future task, but I may want to tackle it after I update to the current rc-1.05.00 (I was still using master). |
Okay, thought I had this running...but it looks like the flight software gets hung up in the gps initialization phase...
The gps simulator is running (as well as the nos_engine_standalone)...any ideas as to what this could be waiting for? Thanks in advance. |
This looks like code from the master branch, since removed in rc-1.05.00. But in that version the LibInit is going to make the UART connection to NOS Engine. It is likely hung trying to connect to the standalone server. |
Interesting...yes, it is master branch. I haven't started the transition over to the new rc yet (have built and run it, but not tried to containerize). how are the docs coming for the rc? have seen a couple anomalies (since I've built) in some commands sent through COSMOS not echoing in the core flight software and wondering where the issue might be...(e.g. 'cmd("GENERIC_REACTION_WHEEL GENERIC_RW_REQ_DATA_CC")') |
yes, the core flight software is throwing this (or maybe the engine):
Did a search of the NOS3 vagrant built VM and couldn't find the 'libtime_sim.so' there either, so that may not be a big deal...not sure about the other...both the nos_engine_standalone and gps_simulator are running... |
FYI, since I have the rc1.05.00 working (which has a more robust cFS cmd/tlm), I am closing this issue (which was against 1.04.00). |
Hello,
A couple colleagues and I were trying to make a version of nos3 runnable from a docker container...I know, not really following the 1 app per container guidance, but we thought it would be cool to try to simplify a 'run' environment.
Of course, we started 42 in a non-ui mode...most things build and seem to run okay, except for the core flight software...when we try to start that up in a container one of a few things happen:
Not quite sure why the 'root' user would be denied creating a new thread...there seems to be plenty of memory and cpus available. I was googling the error and found some information about setting capabilities on an executable directly (CAP_SYS_NICE), but when I tried that it did not get any further (nor did adding it to the container).
Do you have any ideas as to what may be occurring?
Our initial docker creation does do some things differently (at least in a different order (installing dependent libs in a pre-run container); and everything is owned by/running as 'root'). But not sure what would explain the issue(s) we are seeing.
Thanks in advance for any help.
Best Regards,
The text was updated successfully, but these errors were encountered: