You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/04/21 16:20:55 UTC
[GitHub] [nifi-minifi-cpp] lordgamez opened a new pull request, #1315: MINIFICPP-1810 Provide logs to be read from docker logs
lordgamez opened a new pull request, #1315:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1315
A `start.sh` script is added to the Docker image to tail the MiNiFi log file to stdout done in a similar fashion as it is done in NiFi. This way it will be available to be consumed by the `docker logs` command for debugging and log collection while running the MiNiFi inside a container or in a kubernetes cluster.
------------------------------------------------------
Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
- [ ] Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
- [ ] Has your PR been rebased against the latest commit within the target branch (typically main)?
- [ ] Is your initial contribution a single, squashed commit?
### For code changes:
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file?
- [ ] If applicable, have you updated the NOTICE file?
### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
### Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on a diff in pull request #1315: MINIFICPP-1810 Provide logs to be read from docker logs
Posted by GitBox <gi...@apache.org>.
lordgamez commented on code in PR #1315:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1315#discussion_r856064453
##########
docker/Dockerfile:
##########
@@ -174,9 +174,12 @@ RUN addgroup -g ${GID} ${USER} && adduser -u ${UID} -D -G ${USER} -g "" ${USER}
# Copy built minifi distribution from builder
COPY --from=build --chown=${USER}:${USER} ${MINIFI_VERSIONED_HOME} ${MINIFI_HOME}
+RUN mkdir ${MINIFI_HOME}/scripts
+COPY --from=build --chown=${USER}:${USER} ${MINIFI_BASE_DIR}/docker/scripts/start.sh ${MINIFI_HOME}/scripts
+RUN chmod +x ${MINIFI_HOME}/scripts/start.sh
USER ${USER}
WORKDIR ${MINIFI_HOME}
# Start MiNiFi CPP in the foreground
-CMD ["./bin/minifi.sh", "run"]
+CMD ["./scripts/start.sh"]
Review Comment:
Good point, I checked with the NiFi team and it seems that they use this method due to legacy problems, but will be changed in the future, so we do not have any reason not to use stderr in a docker container by default for logging. I updated the default log properties in 38705267358e4e56f40a9a720dbcd68508a0a69f and we can use `docker logs` for every container in our test environment as well from now on.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] szaszm commented on a diff in pull request #1315: MINIFICPP-1810 Provide logs to be read from docker logs
Posted by GitBox <gi...@apache.org>.
szaszm commented on code in PR #1315:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1315#discussion_r855526559
##########
docker/Dockerfile:
##########
@@ -174,9 +174,12 @@ RUN addgroup -g ${GID} ${USER} && adduser -u ${UID} -D -G ${USER} -g "" ${USER}
# Copy built minifi distribution from builder
COPY --from=build --chown=${USER}:${USER} ${MINIFI_VERSIONED_HOME} ${MINIFI_HOME}
+RUN mkdir ${MINIFI_HOME}/scripts
+COPY --from=build --chown=${USER}:${USER} ${MINIFI_BASE_DIR}/docker/scripts/start.sh ${MINIFI_HOME}/scripts
+RUN chmod +x ${MINIFI_HOME}/scripts/start.sh
USER ${USER}
WORKDIR ${MINIFI_HOME}
# Start MiNiFi CPP in the foreground
-CMD ["./bin/minifi.sh", "run"]
+CMD ["./scripts/start.sh"]
Review Comment:
stderr would be even better if docker and k8s is capable of using that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] szaszm commented on a diff in pull request #1315: MINIFICPP-1810 Provide logs to be read from docker logs
Posted by GitBox <gi...@apache.org>.
szaszm commented on code in PR #1315:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1315#discussion_r855525744
##########
docker/Dockerfile:
##########
@@ -174,9 +174,12 @@ RUN addgroup -g ${GID} ${USER} && adduser -u ${UID} -D -G ${USER} -g "" ${USER}
# Copy built minifi distribution from builder
COPY --from=build --chown=${USER}:${USER} ${MINIFI_VERSIONED_HOME} ${MINIFI_HOME}
+RUN mkdir ${MINIFI_HOME}/scripts
+COPY --from=build --chown=${USER}:${USER} ${MINIFI_BASE_DIR}/docker/scripts/start.sh ${MINIFI_HOME}/scripts
+RUN chmod +x ${MINIFI_HOME}/scripts/start.sh
USER ${USER}
WORKDIR ${MINIFI_HOME}
# Start MiNiFi CPP in the foreground
-CMD ["./bin/minifi.sh", "run"]
+CMD ["./scripts/start.sh"]
Review Comment:
Instead of this script, we should configure the minifi logger to output logs to stdout, through `minifi-log.properties`. Can we do that in the context of the docker image?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] szaszm closed pull request #1315: MINIFICPP-1810 Provide logs to be read from docker logs
Posted by GitBox <gi...@apache.org>.
szaszm closed pull request #1315: MINIFICPP-1810 Provide logs to be read from docker logs
URL: https://github.com/apache/nifi-minifi-cpp/pull/1315
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org