2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-28 11:57:37 +00:00

42 Commits

Author SHA1 Message Date
Jarrod Johnson
b809514ef9 Fix osdeploy initialize dependency on master key
Make sure confluent has made /etc/confluent, and further always initialize the
encryption key, as it will almost certainly
be needed and easiest to just always
generate on first startup.
2022-02-08 16:40:41 -05:00
Jarrod Johnson
fd8dd03587 Implement a confluent instance uuid
This allows clients to indicate after install
whether they belong to the collective or
not, allowing ascertaining new deployment
server.
2021-10-19 09:57:49 -04:00
Jarrod Johnson
9bfdd20919 Add sanity check to confluent start
Refuse to start if /etc/confluent is in bad shape that
may create issues later.
2021-08-04 10:54:21 -04:00
Jarrod Johnson
3d2422ded3 Coerce iterator to list for length check 2021-04-07 08:40:18 -04:00
Jarrod Johnson
7d0f47bbcb Correct syntax for measuring collective size 2021-04-07 08:31:29 -04:00
Jarrod Johnson
9a779f2dd2 Improve collective startup behavior
Have confluent focus on establishing quorum before
initiating headless console and discovery activity.
2021-04-07 07:58:10 -04:00
Jarrod Johnson
14d13749ad Guarantee consoleserver init before use
During a restart, a client may aggressively trigger
console reconnect before the consoleserver starts.

Make sure that the daemon is running and globals
ready before API could possible ask for console.
2021-04-02 13:57:45 -04:00
Jarrod Johnson
0fe136d4ee Extend a proxydhcpack
This is one stage of actually
providing download over
PXE.
2020-04-01 16:40:47 -04:00
Jarrod Johnson
c666b11138 Add ability to foreground exec confluent
This allows easier debug and option for unit file
in systemd to run foreground if it makes sense.
2020-01-31 08:10:01 -05:00
Jarrod Johnson
90e546bcac Implement a number of py3 compatible adjustments 2019-10-02 08:58:39 -04:00
Jarrod Johnson
81c0adbbe3 More python 3 compatibility fixes
Improve more commands and modules to parse and execute under python 3.
2019-06-28 08:51:57 -04:00
Jarrod Johnson
ca9e7d1d93 Attempt to catch filesystem full condition
Provide a more obvious behavior when filesystem fills
to explain confluent behavior in this situation.
2019-02-21 16:32:37 -05:00
Jarrod Johnson
d4babbffa4 Check and try to start collective on startup
Not yet good enough for a leader to rejoin, but enough for a follower
to rejoin automatically.
2018-05-16 11:27:46 -04:00
Jarrod Johnson
085a9fed37 Do not error if debug or usr1 handling is impossible
Windows is a limited platform, let it run regardless.
2017-08-02 16:43:08 -04:00
Jarrod Johnson
e2b7440a5c Put id of thread in the trace
When looking at the traces, handy to have ids for each thread for various
purposes.
2017-07-31 10:02:05 -04:00
Jarrod Johnson
e0cc67f57a Implement Lenovo Thinksystem and discovery support 2017-06-20 14:56:24 -04:00
Jarrod Johnson
563a2b11c3 Change the stdout/stderr/trace logs to not buffer things over time
If something went completely off the rails, it could easily fill up lots of memory with log entries in the 2 seconds it
would buffer.  For now disable the buffering on key debug logs, as the main purpose was reducing IOPs in the per-node
console logs anyway.  A future behavior may be to also limit the size and/or number of outstanding log entries before
committing to disk.
2017-04-11 14:40:05 -04:00
Jarrod Johnson
919dab9b55 Create auth multiprocessing pool on demand
Most of the time, we don't need this pool.  Create when needed,
and clean up after 30 seconds of inactivity.  This avoids a slow
shutdown that was due to core python hanging in help_finish_stuff,
and as a bonus means most of the time, one only sees one confluent
process, which has been a source of questions already.
2017-03-05 08:28:35 -05:00
Jarrod Johnson
ae806e55b0 Add a utility to frontend DB dump/restore
This exposes the library functions as a utility
2017-02-15 10:46:26 -05:00
Jarrod Johnson
548e4404ce Fix confluent startup error if dead
Clean up stale dbg.sock if present rather than fail to start.  Also, if the pid indicated in pid file doesn't exist, ignore
the pidfile contents.
2017-01-06 13:43:02 -05:00
Jarrod Johnson
d183ef768d Defer console startup until after API startup
Consoles starting up would potentially delay API availaility.  Change
by having the API having ample time to startup, then commence the
busy work of starting cnosole sessions.
2016-09-13 11:33:53 -04:00
Jarrod Johnson
96670784f9 Automatically increase limits
Knowing ahead of time that confluent is the sort of app that, despite
best efforts, is filehandle heavy, auto-attempt to raise soft to
be equal to hard limit.  A sufficiently large cluster (i.e. more than 2000
nodes) would still need to have limit adjusted at system level for now.
2016-05-10 14:44:52 -04:00
Jarrod Johnson
2ea7ee0dcb Add thread traces to USR1 handler
When receiving a USR1 signal, it did usefully provide
'the' current stack, useful for diagnosing really hard
hangs.  However, it's frequently informative to see all
the thread stack traces, so add that data to the diagnostic
feature.
2016-03-26 13:34:21 -04:00
Jarrod Johnson
fb1e20906e Do not worry over non-existant debug socket
If the socket was not created, do not error on exit because it isn't there to be cleaned up.
2016-03-15 11:15:15 -04:00
Jarrod Johnson
378df2966f Clean up the debug socket
Also limit permissions of the socket.
2016-03-13 17:29:10 -04:00
Jarrod Johnson
b6546f923b Fix security key initialization race condition
When initializing security key, a background thread may occur.  Sometimes,
the system would go to daemonize while that thread was still running, and
the whole system could exit.  Leading to incomplete write to globals as well
as leaving the daemon looking at the data copied over from pre-fork and
seeing the last state of that thread forever frozen.  Make sure the background
threads are fully done prior to exiting.
2016-03-08 11:34:25 -05:00
Jarrod Johnson
40007a6a07 Enable debug socket for sufficiently new eventlet
Newer versions of eventlet address the bug in backdoor when used with
unix domain sockets.  Detect and take advantage of that circumstance.
2016-03-07 16:44:11 -05:00
Jarrod Johnson
f02c74cce0 Add facility to dump trace to log
If confluent gets stuck, provide a debug facility
to sample where it is stuck.  Sending confluent
SIGUSR1 will now cause /var/log/confluent/hangtraces
to get written to.
2015-10-28 10:45:18 -04:00
Jarrod Johnson
2c2884f80f Fix pid file behavior on exit
Previous change failed to correct the sense of the 'doexit'
function.
2015-10-15 09:39:44 -04:00
Jarrod Johnson
d4828b2115 Fix pid file creation
The windows support to 'gracefully' deal with no fcntl
incorrectly broke fcntl usage under linux in main.  Fix
the check to be accurate.
2015-10-14 15:30:43 -04:00
Jarrod Johnson
a0e6e0b5c6 Merge branch 'windowssupport' of git://github.com/jjohnson42/confluent into jjohnson42-windowssupport
Additionally, rework locking back to not require any extra files
2015-09-28 09:56:03 -04:00
chenglch
dc436fda74 Add log rotation support
Add TimedAndSizeRotatingFileHandler which mixes together
the RotatingFileHandler and TimedRotatingFileHandler from
python logging module to process the log data.

Add logrollover event to track the renamed information, so
that console session can read the log data from current log
file and last renamed file.

Global configuration is used by the log handler. The format
of the log section in '/etc/confluent/service.cfg' is like:
[log]
when = m
backup_count = 3
max_bytes = 8192
utc = False
2015-09-23 23:36:46 -04:00
Jarrod Johnson
765c15ed5b Revert 'confluentd' change
After further investigation, the rename to confluentd was not
needed (after massaging pathex and using pip to install rather
than distutils).
2015-09-23 11:48:27 -04:00
Jarrod Johnson
29417d935c Phase 2 of Windows compatibility
More work to try to enable confluent to be frozen by
pyinstaller
2015-09-23 11:48:20 -04:00
Jarrod Johnson
b48cd8b685 Implement basic functionality under windows
Windows support by removing pid file, daemonizing, locking,
and other features.  Goal is to have a freezeable payload.
2015-09-23 11:48:17 -04:00
Jarrod Johnson
6e5a7e15d9 Cleanup pid on abnormal exit
If unlocking the security keys or loading the
plugins experiences an error, do not leave a
stale pid file behind.
2015-07-28 10:53:15 -04:00
Jarrod Johnson
4aef8524e9 Implement specifying an external cfg key file
This allows the password to be protected by an external
file.  With this one can chain confluent's security to another
security mechanism.
2015-07-08 16:19:47 -04:00
Jarrod Johnson
49bff93eed Provide for configuration of the TLS remote socket
Refactor the http api configuration and have a section to
apply to the remote TLS socket as well.

From Lucio Seki
2015-07-06 13:48:01 -04:00
Jarrod Johnson
97c928350c Provide for configuration file specification of http listen
Establish a config file for certain configuration parameters that
control service startup and things that are best managed via out
of band configuration file and easiest to do with a restart.  For
now, implement control of http service binding.

From Lucio Seki
2015-07-02 13:23:48 -04:00
Jarrod Johnon
384baea038 Handle non-ascii unicode better
Clarify that the data is in UTF-8 where applicable.  It is expected
that clients are capable of handling UTF-8 for now.  Additionally,
the HTML api explorer handling of numeric data is fixed.
2015-01-19 14:45:24 -05:00
Jarrod Johnson
4911de81e6 Have confluent automatically set up /var/run/confluent if permitted
If wanting to run as non-root, mkdir -p /var/run/confluent /var/log/confluent /etc/confluent
and chown those to be owned by confluent user.  That is probably path for deb and rpm packaging.
2014-05-13 10:59:41 -04:00
Jarrod Johnson
c5cb5649d5 Begin reorganizing content for packaging 2014-05-06 13:37:31 -04:00