Skip to content

Add Version Check to skip log4j1 tasks for C3 Next Gen 2.2.0+#2406

Open
Mihir Chandna (mihirchandna) wants to merge 1 commit into7.9.xfrom
log4j-c32
Open

Add Version Check to skip log4j1 tasks for C3 Next Gen 2.2.0+#2406
Mihir Chandna (mihirchandna) wants to merge 1 commit into7.9.xfrom
log4j-c32

Conversation

@mihirchandna
Copy link
Member

@mihirchandna Mihir Chandna (mihirchandna) commented Jan 23, 2026

Description

This PR adds a version check in C3 next gen task to skip log4j1-specific tasks when deploying C3 Next Gen 2.2.0 or later.
Control Center Next Gen 2.2.0+ uses log4j2 exclusively (log4j1 was removed) - C3 PR

Running log4j1 configuration tasks on these versions is unnecessary and cause failures when the legacy log4j config files don't exist.

Fixes # (issue)
For CP<7.9.4 the below task for C3 failed silently but from 7.9.5 there is a pipefail command at the start of this task so there is a complete deploy failure, trace below

TASK [confluent.platform.common : Register Appenders] **************************
07:43
fatal: [ip-10-0-221-104.us-west-2.compute.internal]: FAILED! => {"changed": false, "cmd": "set -o pipefail\ngrep RollingFileAppender /etc/confluent-control-center/log4j-rolling.properties | cut -d '=' -f 1 | cut -d '.' -f 3\n", "delta": "0:00:00.007741", "end": "2026-01-22 08:40:54.852453", "msg": "non-zero return code", "rc": 1, "start": "2026-01-22 08:40:54.844712", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
07:44
PLAY RECAP *********************************************************************

Ref: https://confluent.slack.com/archives/CMTBL483Y/p1769072706017299

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Couldn't get molecule tests to run on my local

Ran a cp-env job to deploy c3 using this ansible branch: https://semaphore.ci.confluent.io/jobs/4f3c2b22-e5b5-4c40-90c9-5f37ccc1e9ef#L3091

Checklist:

  • Any variable/code changes have been validated to be backwards compatible (doesn't break upgrade)
  • I have added tests that prove my fix is effective or that my feature works
  • If required, I have ensured the changes can be discovered by cp-ansible discovery codebase
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@mihirchandna Mihir Chandna (mihirchandna) requested a review from a team as a code owner January 23, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant