-
Notifications
You must be signed in to change notification settings - Fork 230
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
Bug 1538560 - [RFE]rename the project name mux-undefined #1065
Conversation
docs/mux-logging-service.md
Outdated
use a namespace of `mux-undefined`, so the log records will be in an index | ||
named something like `project.mux-undefined.$mux-undefined_uuid.YYYY.MM.DD` | ||
use a namespace of `.orphaned`, so the log records will be in an index | ||
named something like `project..orphaned.$mux-undefined_uuid.YYYY.MM.DD` |
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.
.orphaned
isn't a namespace - @jcantrill - what is the full index name for orphaned records? .orphaned.orphan-uuid.YYYY.MM.DD
?
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.
docs/mux-logging-service.md
Outdated
@@ -277,7 +277,7 @@ of the cluster. It is expected that the record has the `@timestamp` field and | |||
is already formatted for the ViaQ data model. If the tag matches | |||
`project.namespacename.**`, mux extracts the `namespacename` and passes this to | |||
the k8s meta filter plugin in order to get the namespace uuid. If the tag does | |||
not match, mux uses a namespacename of `mux-undefined`. Except for the k8s | |||
not match, mux uses a namespacename of `.orphaned`. Except for the k8s |
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.
.orphaned isn't a namespace
docs/mux-logging-service.md
Outdated
@@ -360,7 +360,7 @@ The next stage in the pipeline is this filter: | |||
|
|||
This examines the tag to see if it is of the form | |||
`project.namespacename.whatever`, and sets the field `mux_namespace_name` to | |||
the value of `namespacename` if it is in that form, or `mux-undefined` | |||
the value of `namespacename` if it is in that form, or `.orphaned` |
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.
.orphaned isn't a namespace
mux_need_k8s_meta ${(record['namespace_uuid'] || record.fetch('kubernetes', Hash.new)['namespace_id'].nil?) ? "true" : "false"} | ||
kubernetes {"namespace_name":"${record['namespace_name'] || (tag_parts[0] == 'project' && tag_parts[1]) || ENV['MUX_UNDEFINED_NAMESPACE'] || 'mux-undefined'}","namespace_id":"${record['namespace_uuid'] || record.fetch('kubernetes', Hash.new)['namespace_id']}"} | ||
kubernetes {"namespace_name":"${record['namespace_name'] || (tag_parts[0] == 'project' && tag_parts[1]) || ENV['MUX_UNDEFINED_NAMESPACE'] || '.orphaned'}","namespace_id":"${record['namespace_uuid'] || record.fetch('kubernetes', Hash.new)['namespace_id']}"} |
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.
@jcantrill what is the namespace_id for .orphaned?
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.
fluent-plugin-kubernetes_metadata_filter/README.md:
orphaned_namespace_name
- The namespace to associate with records where the namespace can not be determined (default:.orphaned
)orphaned_namespace_id
- The namespace id to associate with records where the namespace can not be determined (default:orphaned
)
Could there be a possibility record.fetch('kubernetes', Hash.new)['namespace_id'] is nil? If so, we should add another default for orphane?
-
kubernetes {"namespace_name":"${record['namespace_name'] || (tag_parts[0] == 'project' && tag_parts[1]) || ENV['MUX_UNDEFINED_NAMESPACE'] || '.orphaned'}","namespace_id":"${record['namespace_uuid'] || record.fetch('kubernetes', Hash.new)['namespace_id'] || 'orphaned'}"}
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.
Could there be a possibility record.fetch('kubernetes', Hash.new)['namespace_id'] is nil? If so, we should add another default for orphane?
Yes. If we cannot determine the namespace_id in any other way, we should use orphaned
.
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.
https://github.com/openshift/origin-aggregated-logging/blob/master/fluentd/configs.d/input-post-forward-mux.conf#L87-L88
If mux_namespace_name is ENV["MUX_UNDEFINED_NAMESPACE"] or ".orphaned", do we want to set the tag to "mux" to skip "k8s meta"?
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.
yes, good idea
test/mux.sh
Outdated
espod=$es_pod | ||
# make sure this namespace exists | ||
os::cmd::try_until_success "oc get project mux-undefined" 2>&1 | artifact_out | ||
os::cmd::try_until_success "oc get project .orphaned" 2>&1 | artifact_out |
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 thought this didn't work?
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.
Right. It fails...
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.
we don't need this check anymore
/retest |
1e07f63
to
46faaf8
Compare
The logs which failed to associate with the namespace/project will be indexed into the ES index file .orphaned.YYYY.MM.DD instead of the project.mux-undefined.*. In rewrite_tag_filter (input-post-forward-mux.conf), if mux_namespace_name is .orphaned, we will skip the effort to get k8s_metadata.
Note: This pr is supposed to be released with openshift/openshift-ansible#7792. |
does this PR work without the corresponding ansible change? If so, what happens? |
The corresponding openshift-ansible is for eliminating openshift_logging_mux_default_namespaces. Functionality-wise, there is no impact with or without the openshift-ansible pr7792, I'd think. |
/lgtm |
There is a backport 3.9 - do we need this in 3.9? |
I set it just because the target release of bz1538560 is 3.9.z. Probably, we could reset it to 3.10? |
Yes, I think so. The other related change to rename logging to openshift-logging is also in 3.10 and is not backported. |
Reset the target release of bz. Removing backport/3.9, as well... |
mux-undefined ==> .orphaned
mux.sh: if there are any tests which create project "mux-undefined"
just remove that project checking and creation.