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
Drop support for non systemd OS #357
base: master
Are you sure you want to change the base?
Conversation
before => Service[$service_name], | ||
} | ||
} | ||
fail('Console Producer is not supported on systemd, because the stdin of the process cannot be redirected') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if this is still valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats what I have been wondering, too. But I am not too familiar with kafka to make a call there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd vote for keeping it as fail()
.. then I'd vote to drop both kafka::consumer
and kafka::producer
classes as those are mostly useless from my point of view. Though, I might be wrong 🤷🏻♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see 2 Options here:
- Kafka producers are now supported for systemd by kafka -> this has to be patched to follow this
- Kafka producers still dont support systemd -> the producer class can be dropped
Both requires knowledge about kafka I dont have yet. Therefore this might be something we should solve in a different PR (maybe someone using kafka stumbles upon this module and helps out). For the time being we can keep the fail() part as we change nothing about the original logic (and therefore dont break stuff that hasnt been broken.
As for the consumer: I want to provide another PR that at least combines the subclasses together. The class in and of itself is usefull. Supporting Kafka consumers is a good feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I see there is nothing to do from the Kafka side. All the "magic" was implemented in the init-script completely (see kafka::producer::input
IIRC). Theoretically, it's possible to implement something alike with the StandartInput{,Text,Data}
unit params.
Fun enough, there is no "opposite way" for the kafka::consumer
. That's why I cannot understand what is the use-case for the consumer class 🤔
it { is_expected.to contain 'export KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=9993"' } | ||
it { is_expected.to contain 'export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:/opt/kafka/config/log4j.properties"' } | ||
end | ||
|
||
describe file('/etc/systemd/system/kafka-consumer.service'), if: (fact('operatingsystemmajrelease') == '7' && fact('osfamily') == 'RedHat') do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this now be true for any OS? And shouldn't this have been modified when EL 8 & EL 9 support was added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue this check is never executed, since we only support systemd as service providers for quite some time.
No description provided.