Mike McLean
4fa2901720
cleanup
...
unused var
whitespace
missing import
2019-01-15 10:51:19 -05:00
Mike McLean
c60ec3c2f3
add a unit test
2019-01-15 10:51:19 -05:00
Tomas Kopecek
4191840bd7
check_sigmd5 for kojivmd
2019-01-15 10:51:19 -05:00
Tomas Kopecek
28ce53afc3
use correct fileinfo checksum field
...
Fixes: https://pagure.io/koji/issue/966
2019-01-15 10:51:19 -05:00
Mike McLean
f04346e43f
PR#1187: Add ctx option to ClientSession.krb_login()
...
Merges #1187
https://pagure.io/koji/pull-request/1187
2019-01-15 10:48:31 -05:00
mprahl
5687f7bcef
Don't force the Kerberos cache to be stored as a file when using the ccache kwarg on krb_login
...
A multi-threaded application may choose to store the Kerberos cache in the
thread keyring [1] to avoid Kerberos cache corruption. Since `krb_login` prepends
the passed in `ccache` with `FILE:`, the application must resort to setting the
`KRB_CCACHE` environment variable. This is annoying and unnecessary because
ccache defaults to `FILE` anyways if no Kerberos cache type is specified in the
value for `ccache` [2].
1 - http://man7.org/linux/man-pages/man7/thread-keyring.7.html
2 - https://web.mit.edu/kerberos/krb5-1.12/doc/basic/ccache_def.html#ccache-types
2018-12-13 12:57:45 -05:00
mprahl
4b6c92045f
Add a ctx kwarg to ClientSession.krb_login
...
Before this change, `koji.ClientSession.krb_login` always used the
default context. This can be an issue when a multi-threaded application
shares this context and the Kerberos cache is stored in the thread keyring.
In this scenario, the first thread to run `krb_login` will succeed while
all others will get a "Permission denied" error. By adding the `ctx` kwarg,
a thread can establish a context and tell `krb_login` to use it instead of
the default context.
2018-12-13 12:49:38 -05:00
Mike McLean
2b8a9dd573
PR#1175: kojira: avoid race condition that causes "unknown task" errors
...
Merges #1175
https://pagure.io/koji/pull-request/1175
Fixes : #942
https://pagure.io/koji/issue/942
kojira: Needed tag refers to unknown task
2018-12-04 22:53:58 -05:00
Mike McLean
11a1c7beed
make recent_tasks lifetime configurable
2018-12-04 22:53:52 -05:00
Mike McLean
3f0a2952ee
don't iterate over the dict we are changing
2018-12-04 22:53:52 -05:00
Mike McLean
fea969e91b
kojira: avoid race condition that causes "unknown task" errors
2018-12-04 22:53:52 -05:00
Mike McLean
f71804d039
PR#964: few sort speedups
...
Merges #964
https://pagure.io/koji/pull-request/964
Fixes : #963
https://pagure.io/koji/issue/963
Speedup sorts
2018-12-04 00:05:32 -05:00
Tomas Kopecek
17db100db5
few sort speedups
...
Fixes: https://pagure.io/koji/issue/963
2018-12-04 00:05:26 -05:00
Mike McLean
088d500e0e
PR#852: drop encode_int helper
...
Merges #852
https://pagure.io/koji/pull-request/852
Fixes : #750
https://pagure.io/koji/issue/750
Drop use of encode_int on hub
2018-12-03 23:55:45 -05:00
Tomas Kopecek
f4ee150026
drop encode_int helper
...
We're already using i8 encoding mechanism, so this function is no more
needed.
Fixes: https://pagure.io/koji/issue/750
2018-12-03 23:55:39 -05:00
Mike McLean
ecfcb5b935
PR#1043: remove old messagebus plugin
...
Merges #1043
https://pagure.io/koji/pull-request/1043
Fixes : #878
https://pagure.io/koji/issue/878
Deprecate old messagebus plugin
2018-12-03 23:49:44 -05:00
Tomas Kopecek
3e37644f25
remove old messagebus plugin
...
There is no more known user. If you need messaging functionality, you
could migrate to protonmsg plugin.
Fixes: https://pagure.io/koji/issue/878
2018-12-03 23:49:37 -05:00
Mike McLean
d424fb085b
PR#1176: kojid: implement task_avail_delay check
...
Merges #1176
https://pagure.io/koji/pull-request/1176
Relates: #340
https://pagure.io/koji/issue/340
koji doesn't take plugins into account when median capacity is calculated
2018-12-03 15:54:20 -05:00
Mike McLean
cc7afa1b17
more tests and another fix
2018-12-03 15:54:07 -05:00
Mike McLean
beac7899ec
partial unit test with minor fix
2018-12-03 15:54:07 -05:00
Mike McLean
25d8e41f31
cleanup
2018-12-03 15:54:07 -05:00
Mike McLean
2ab6a6eff0
initialize TaskManager.skipped_tasks
2018-12-03 15:54:07 -05:00
Mike McLean
586e23f228
allow setting task_avail_delay in kojid.conf
2018-12-03 15:54:07 -05:00
Mike McLean
c3b7c815cb
add a timeout for skipping a task based on bin capacity
2018-12-03 15:54:07 -05:00
Mike McLean
06953ffba1
PR#1180: Update source when recycling build
...
Merges #1180
https://pagure.io/koji/pull-request/1180
Fixes : #1179
https://pagure.io/koji/issue/1179
Stale source field of recycled builds
2018-12-03 15:33:31 -05:00
Mike McLean
a3643f7b64
fix unit test
2018-12-03 15:31:37 -05:00
Mike McLean
98bffbad11
also set extra and volume_id in recycle_build
2018-12-03 15:20:09 -05:00
Mikolaj Izdebski
f8d2f4395e
Update source when recycling build
...
Fixes : #1179
2018-12-03 15:20:09 -05:00
Mike McLean
91a4011e3a
PR#1178: cli: document parse_arches method parameters
...
Merges #1178
https://pagure.io/koji/pull-request/1178
2018-11-30 15:23:16 -06:00
Ken Dreyer
9fe61b561f
cli: document parse_arches method parameters
...
Document the parameters for the parse_arches method.
2018-11-29 08:22:13 -07:00
Mike McLean
0e043e1e6b
PR#920: use relative symlinks for hub imports
...
Merges #920
https://pagure.io/koji/pull-request/920
Fixes : #913
https://pagure.io/koji/issue/913
hub uses absolute symlinks for imported work files
2018-11-28 16:27:58 -05:00
Tomas Kopecek
9963877545
move move_and_symlink to koji.util
2018-11-28 16:27:30 -05:00
Tomas Kopecek
6a6f90be1e
use relative symlinks for hub imports
...
Fixes: https://pagure.io/koji/issue/913
2018-11-28 16:27:30 -05:00
Mike McLean
109a0d8da5
PR#981: cli: add a param in watch_tasks to override KeyboardInterrupt output
...
Merges #981
https://pagure.io/koji/pull-request/981
Fixes : #976
https://pagure.io/koji/issue/976
Make output from watch_tasks customizable when ctrl+c is pressed
2018-11-28 15:26:29 -05:00
Mike McLean
7e3daf4a9e
whitespace
2018-11-28 15:25:57 -05:00
Mike McLean
65a3dc0953
move inner function out of except clause
2018-11-28 15:25:57 -05:00
Yuming Zhu
9a0d735d40
move quiet option into ki_handler
2018-11-28 15:25:57 -05:00
Yuming Zhu
30ed89e485
cli: add a param in watch_tasks to override KeyboardInterrupt output
2018-11-28 15:25:57 -05:00
Mike McLean
47912f0470
PR#1042: don't fail on missing field in base policy tests
...
Merges #1042
https://pagure.io/koji/pull-request/1042
Fixes : #1038
https://pagure.io/koji/issue/1038
policy tests should handle None/missing values gracefully
2018-11-28 15:08:57 -05:00
Tomas Kopecek
8370a8e0ad
don't fail on missing field in base policy tests
...
Fixes: https://pagure.io/koji/issue/1038
2018-11-28 09:01:20 +01:00
Mike McLean
a05478e22c
PR#1172: make timeout of authentication configurable
...
Merges #1172
https://pagure.io/koji/pull-request/1172
Fixes : #1171
https://pagure.io/koji/issue/1171
GSSAPI authentication timeout should be able to be configured
2018-11-27 10:39:22 -05:00
Yuming Zhu
5214e54ff0
set default value for timeout and auth_timeout in read_config
...
and do not override auth_timeout = 0 by default: 60 which means no timeout
2018-11-27 10:39:11 -05:00
Yuming Zhu
2696f35b55
make timeout of authentication configurable
2018-11-27 10:39:11 -05:00
Mike McLean
31b9e14dfe
PR#1168: remove shebang in context module
...
Merges #1168
https://pagure.io/koji/pull-request/1168
2018-11-26 16:55:47 -05:00
Yuming Zhu
cab5a01dcb
move tests to test_lib/test_context.py
2018-11-22 18:43:31 +08:00
Yuming Zhu
2394682a4d
remove shebang in context module
2018-11-22 02:48:36 +08:00
Mike McLean
f6e499589d
PR#1045: cli: [free-task] raise error when no task-id specified
...
Merges #1045
https://pagure.io/koji/pull-request/1045
Fixes : #1044
https://pagure.io/koji/issue/1044
CLI method free-task without task_id should return error message
2018-11-20 16:32:44 -05:00
Mike McLean
f8b69fe033
adjust grammar in error message
2018-11-20 16:32:10 -05:00
Yuming Zhu
59a2e7906d
cli: [free-task] raise error when no task-id specified
2018-11-20 16:29:49 -05:00
Mike McLean
51252617c0
PR#1056: Print warning to stderr
...
Merges #1056
https://pagure.io/koji/pull-request/1056
Fixes : #1047
https://pagure.io/koji/issue/1047
buildinfo CLI call should send error message to error output for non existing build
2018-11-20 15:54:57 -05:00