Skip to content
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

Redirect startup.log to stdout #577

Merged
merged 2 commits into from
Nov 7, 2023
Merged

Redirect startup.log to stdout #577

merged 2 commits into from
Nov 7, 2023

Conversation

roypaulin
Copy link
Collaborator

@roypaulin roypaulin commented Nov 6, 2023

In the v2 vertica image, we can now redirect startup.log to stdout by setting VERTICA_STARTUP_LOG_DUPLICATE to /proc/1/fd/1.

An example of a Vertica pod log output via kubectl logs v-sc0-0:

2023/11/06 14:34:09 New NodeManagementAgent starting
2023/11/06 14:34:09 Checking for existence of directory  /opt/vertica/log
2023/11/06 14:34:09 Moving working directory to  /opt/vertica/log
2023/11/06 14:34:09 Successfully opened file node_management_agent.log. Setting log output to that file.
{
  "goal" : 27,
  "node" : "v_vertdb_node0001",
  "progress" : 0,
  "stage" : "Reading Catalog",
  "text" : "Indexing Objects",
  "timestamp" : "2023-11-06 14:34:18.414"
}
{
  "goal" : 27,
  "node" : "v_vertdb_node0001",
  "progress" : 27,
  "stage" : "Reading Catalog",
  "text" : "Indexing Objects",
  "timestamp" : "2023-11-06 14:34:18.414"
}
{
  "node" : "v_vertdb_node0001",
  "stage" : "Connecting to Spread",
  "text" : "Connecting to spread /tmp/4803",
  "timestamp" : "2023-11-06 14:34:18.437"
}
........
{
  "node" : "v_vertdb_node0001",
  "stage" : "Waiting for Cluster Invite",
  "text" : "Prepare to be invited",
  "timestamp" : "2023-11-06 14:34:20.003"
}
{
  "node" : "v_vertdb_node0001",
  "stage" : "Waiting for Cluster Invite",
  "text" : "Ready to be invited",
  "timestamp" : "2023-11-06 14:34:20.004"
}
{
  "goal" : 1,
  "node" : "v_vertdb_node0001",
  "progress" : 1,
  "stage" : "Invite Cluster",
  "text" : "All nodes present",
  "timestamp" : "2023-11-06 14:34:20.007"
}
{
  "node" : "v_vertdb_node0001",
  "stage" : "Invite Cluster",
  "text" : "Inviting cluster",
  "timestamp" : "2023-11-06 14:34:20.009"
}
{
  "node" : "v_vertdb_node0001",
  "stage" : "Waiting for Cluster Invite",
  "text" : "Invited",
  "timestamp" : "2023-11-06 14:34:23.959"
}
{
  "node" : "v_vertdb_node0001",
  "stage" : "Startup Complete",
  "text" : "Node is UP",
  "timestamp" : "2023-11-06 14:34:24.143"
}

@spilchen
Copy link
Collaborator

spilchen commented Nov 7, 2023

This looks good. I think we should add changie entry for this change.

@roypaulin roypaulin merged commit 5f0a96d into main Nov 7, 2023
24 checks passed
@roypaulin roypaulin deleted the roypaulin/log branch November 7, 2023 19:09
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.

2 participants