summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Handle short writes during qacp receiveNathan Straz2013-10-021-15/+17
|
* Add a warning in qarsh about btimedNathan Straz2013-10-021-0/+3
| | | | | | If we don't get a heart beat when qarsh starts, print a warning to check on the btimed service. Commands could be stopped early if it doesn't produce any output and qarsh thinks the host is down.
* Remove unused variablesNathan Straz2013-10-021-5/+0
|
* Remove stat cache which isn't used anymoreNathan Straz2013-10-021-13/+0
|
* Remove offset from data packetNathan Straz2013-10-025-73/+11
| | | | | We really don't need this field since we always copy data sequentially.
* Rewrite qacp receive file to handle all packetsNathan Straz2013-10-022-52/+106
|
* Rewrite send file to handle all packetsNathan Straz2013-10-022-52/+81
| | | | | | | | | This change breaks the qacp protocol! Before there was a chance we would exit before receiving and checking all packets from qarshd. Now we look at all packets and check them. Use data allow packets and larger buffers. Handle errors on the write end.
* Don't let systemd block SIGPIPE on usNathan Straz2013-09-231-0/+1
| | | | | | | We do ignore SIGPIPE inside qarshd so we can handle the error and continue. We do want commands we run to receive SIGPIPE by default so they may die if they don't handle SIGPIPE.
* Bump version for new featuresNathan Straz2013-09-231-1/+5
|
* Change ack type to uint8 like it is in the packet headerNathan Straz2013-09-201-2/+2
|
* Only print an error if we didn't hit a broken pipeNathan Straz2013-09-191-3/+6
|
* Handle stdin pipe closing on usNathan Straz2013-09-193-3/+15
| | | | | | | If xiogen is flooding requests across qarsh and xdoio decides to stop, we need to handle that gracefully. Also, making the pipe non-blocking was not a good idea, xdoio gets the read error EAGAIN and stops there.
* Fix typoNathan Straz2013-09-191-1/+1
|
* Add reasonable log prioritiesNathan Straz2013-09-192-27/+28
|
* Reduce size of some fields sent on the wireNathan Straz2013-09-191-6/+28
| | | | | We don't need 32bits for packet type or remote fd. Keeping the field small also helps with reading traces.
* Close qacp_fd in the function that openned it.Nathan Straz2013-09-191-2/+1
| | | | | We are already closing it in recvfiles because we could create multiple connections. This caused us to close the fd twice.
* Creat a thin logging layerNathan Straz2013-09-195-29/+70
| | | | | | | When qarshd is run via xinetd, stderr still goes out the socket and messages from sockutil.c or qarsh_packet.c can interfere with the protocol. Create a thin wrapper which qacp and qarsh can send to stderr and qarshd can send to syslog.
* Clean up compiler warning on psbufNathan Straz2013-09-191-2/+2
|
* Check all returns from send_packet in qarshNathan Straz2013-09-171-8/+41
|
* Add a loop around getting the packet sizeNathan Straz2013-09-171-10/+11
| | | | Believe it or not, we can get short reads here.
* Don't block writing to child's stdinNathan Straz2013-09-171-2/+2
|
* Don't free basename pointer, it wasn't malloc'dNathan Straz2013-09-171-1/+0
|
* Say something if we can't write to stdoutNathan Straz2013-09-171-0/+2
|
* Remove host from hbeat structNathan Straz2013-09-171-2/+0
| | | | | Since we keep a socket open we don't need this anymore and freeing it causes problems.
* Remove unused utility functionsNathan Straz2013-09-172-104/+0
|
* Increase buffer and packet sizesNathan Straz2013-09-164-7/+7
| | | | | | | | | This coordinates the buffer sizes with the max packet size. qarshd and qarsh will probably break if this value does not match between client and server builds. Also increase the value to reduce overhead. A max packet size of 16k only yields 40MB/s. Increase that to 128k and we can do 500MB/s.
* Only check if stdin is a tty onceNathan Straz2013-09-161-1/+2
|
* Split btime into two partsNathan Straz2013-09-113-98/+74
| | | | | | | We don't need to lookup the addresses every time we get btime. Do it once during hbeat_init and reuse the socket in hbeat. This cleans up the qarsh strace so the hbeat is only a send and recv.
* Don't need to copy this stringNathan Straz2013-09-111-1/+1
|
* Fix up stdin handlingNathan Straz2013-09-112-24/+45
|
* Close both ends of the pipes so we don't leak file descriptorsNathan Straz2013-09-111-0/+3
|
* Don't bother freeing remuser before we exitNathan Straz2013-09-111-1/+0
| | | | | | | If the user is specified as part of the host, we don't need to free it and if it was a separate option, it will get freed when the process ends
* We shouldn't need to round the boot time anymoreNathan Straz2013-09-111-1/+0
|
* Remove unused defineNathan Straz2013-09-111-1/+0
|
* Clean up memory leaks and uninitialized variables in qarshdNathan Straz2013-09-111-0/+5
|
* More memory allocation cleanup in qacpNathan Straz2013-09-111-65/+62
| | | | | | Net removal of 12 strdup calls rstat is properly freed Don't need to strdup for basename, the original is not modified
* Only log debug entries if the debug flag is set.Nathan Straz2013-09-111-2/+2
|
* Clean up memory leaks on sendNathan Straz2013-09-111-9/+5
|
* Remove complicated remote file descriptor codeNathan Straz2013-09-115-47/+37
| | | | | | | | Only handle one file transfer at a time so we don't need an array to track multiple transfers or know the remote's fd number. Loop in recv_packet until we read a whole packet.
* Get commands running over one socketNathan Straz2013-09-114-196/+355
| | | | Added a new packet to limit data sent from the other side.
* Clean up unused variable warningNathan Straz2013-09-111-3/+0
|
* Add option to pause at startupNathan Straz2013-09-111-5/+10
| | | | | | This allows us to attach gdb before anything interesting happens. Use the command 'signal 14' to get the process running again.
* Get qacp remote to local workingNathan Straz2013-09-112-53/+54
|
* Get qacp local to remote working on main socketNathan Straz2013-09-115-205/+170
| | | | | | | | | | I removed the buffering layer from recv_packet because it made the logic too complex around the pselect in qarshd. Now only read as much as needed to get each packet. qarshd adds an array for remote file descriptors which is only a stub for now. This needs to be expanded to allow multiple file transfers at the same time for runcmd.
* Move packet sequence numbering to send_packetNathan Straz2013-09-113-9/+4
|
* Add new data packet typeNathan Straz2013-09-112-1/+98
|
* Send all server side error messages to stderrNathan Straz2013-09-113-28/+28
| | | | This should get sent to the journal or syslog
* Remove last bits of XML dependenciesNathan Straz2013-09-113-21/+10
|
* Convert packet parsingNathan Straz2013-09-113-198/+120
|
* Rewrite qptostr to store binary bits into an existing bufferNathan Straz2013-09-113-137/+122
|