aboutsummaryrefslogtreecommitdiff
path: root/grok-shell
AgeCommit message (Collapse)Author
2015-05-28grok-shell: handle no-argument commandAndy Doan
gitolite supports running a command like: ssh git@git-ie.linaro.org which defaults to the "info" command: https://github.com/sitaramc/gitolite/blob/4ed15ad8e5d82995b3d55cd17446fc90a3c2b7ec/src/gitolite-shell#L153 our grok-shell was exiting with an error. This gets things compatible again Change-Id: I5f62365522e2ad6da2e2ab5ef941b07eaa15d596
2015-05-26grok-shell: include timing information for push operationsAndy Doan
This will help us keep track of how long push operations are taking and also let us be able to determine the cost of our ssh-push optimization where we run "git remote update" after doing a push. The data should be helpful over time to allow us to understand fully the impact of these changes. Change-Id: I59268f59c0c001561705293949dcb21fa5578fc6
2015-05-26grok-shell: improve instantiation of loggerAndy Doan
The logger was only available to main function. This makes it a little cleaner and easy to use throughout the module Change-Id: I646d50f1f63de7a17ff0ba4df0bfd2758ec02cf7
2015-05-18grok-shell: pull in updates to local mirror upon pushAndy Doan
This provides a minor optimization for push operations. Currently if a user pushes to git.l.o from a grok-mirror like git-ie.l.o, they have to wait ~60s before the change will be availble for them to pull in from another computer they are working with. This change allows the grok-slave they are connected to, to update itself. Its a fairly safe change, because even if the new code somehow failed, the real operation on the master has succeeded and the next run of the grokmirror cron script will clean things up. Change-Id: I56e02f5f7d71d30eda3adf5ee939f52da81c080f
2015-05-14grok-shell: include some logging informationAndy Doan
This type of information has proven pretty useful over time for gitolite logs, and I suspect we'll eventually hit a bug where we need this information. This puts a small bit of logging in place for up to five weeks. Change-Id: I660e468a05124436c8d1c917b6b05c6ea57a0ffb
2015-04-28grok: provide tools to optimize ssh git pull/clone on slavesAndy Doan
This adds a simple grok-shell script to be called from an authorized_keys commmand for a user. In the case of a slave, it will determine if the operation is "read" and handle it locally. If its making changes, it will route the request to the grok-shell "master" handling logic running on the master server. In order to support this, we need to keep up with ssh keys on the slave now in a similar manner to what we do for gitolite. The grok-slave-keys script is a slimmed down version of that script to do this. Change-Id: I76aabf6a80b4027193203beace2cd94fa42f845d