oracle / oracle/oci-cloud-controller-manager

Flexvolume-driver 0.10.0 logs an empty line alongside each actual log line

Open
#336 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
Go
Stars
158
Forks
108
PR merge metrics
No merged PRs in 30d

Description

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

CCM Version:

0.10.0

Environment:

  • Kubernetes version (use kubectl version):
    1.15.6
  • OS (e.g. from /etc/os-release):
    Oracle Linux Server 7.6
  • Kernel (e.g. uname -a):
    4.14.35-1844.1.3.el7uek.x86_64
  • Others:

What happened?

I see that oci-flexvolume-driver is logging like this:


2020-12-31T16:18:58.739Z	INFO	metadata/instance_metadata.go:87	Metadata endpoint /opc/v2/instance/ returned response successfully

2020-12-31T16:18:58.739Z	INFO	client/utils.go:94	OCI using read rate limit configuration: QPS=20, bucket=5	{"pid": 26564, "version": "", "build": "", "command": "init"}

2020-12-31T16:18:58.739Z	INFO	client/utils.go:98	OCI using write rate limit configuration: QPS=20, bucket=5	{"pid": 26564, "version": "", "build": "", "command": "init"}

2020-12-31T16:18:58.756Z	INFO	metadata/instance_metadata.go:87	Metadata endpoint /opc/v2/instance/ returned response successfully

2020-12-31T16:18:58.758Z	INFO	metadata/instance_metadata.go:87	Metadata endpoint /opc/v2/instance/ returned response successfully

2020-12-31T16:18:58.758Z	INFO	client/utils.go:94	OCI using read rate limit configuration: QPS=20, bucket=5	{"pid": 26571, "version": "", "build": "", "command": "init"}

2020-12-31T16:18:58.758Z	INFO	client/utils.go:98	OCI using write rate limit configuration: QPS=20, bucket=5	{"pid": 26571, "version": "", "build": "", "command": "init"}

2020-12-31T16:18:58.775Z	INFO	metadata/instance_metadata.go:87	Metadata endpoint /opc/v2/instance/ returned response successfully

2020-12-31T16:18:58.776Z	INFO	metadata/instance_metadata.go:87	Metadata endpoint /opc/v2/instance/ returned response successfully

Notice the empty lines. I think these empty lines shouldn't be there.
They are then incorrectly tracked by our logging system as a separate event.

What you expected to happen?

I expect it to be like this instead:

2020-12-31T16:18:58.739Z	INFO	metadata/instance_metadata.go:87	Metadata endpoint /opc/v2/instance/ returned response successfully
2020-12-31T16:18:58.739Z	INFO	client/utils.go:94	OCI using read rate limit configuration: QPS=20, bucket=5	{"pid": 26564, "version": "", "build": "", "command": "init"}
2020-12-31T16:18:58.739Z	INFO	client/utils.go:98	OCI using write rate limit configuration: QPS=20, bucket=5	{"pid": 26564, "version": "", "build": "", "command": "init"}
2020-12-31T16:18:58.756Z	INFO	metadata/instance_metadata.go:87	Metadata endpoint /opc/v2/instance/ returned response successfully
2020-12-31T16:18:58.758Z	INFO	metadata/instance_metadata.go:87	Metadata endpoint /opc/v2/instance/ returned response successfully
2020-12-31T16:18:58.758Z	INFO	client/utils.go:94	OCI using read rate limit configuration: QPS=20, bucket=5	{"pid": 26571, "version": "", "build": "", "command": "init"}
2020-12-31T16:18:58.758Z	INFO	client/utils.go:98	OCI using write rate limit configuration: QPS=20, bucket=5	{"pid": 26571, "version": "", "build": "", "command": "init"}
2020-12-31T16:18:58.775Z	INFO	metadata/instance_metadata.go:87	Metadata endpoint /opc/v2/instance/ returned response successfully
2020-12-31T16:18:58.776Z	INFO	metadata/instance_metadata.go:87	Metadata endpoint /opc/v2/instance/ returned response successfully

How to reproduce it (as minimally and precisely as possible)?

I think this is the standard behavior of oci-flexvolume-driver on any environment, so it should be easy to reproduce

Anything else we need to know?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the oci-flexvolume-driver logging path, focusing on the entries reported from metadata/instance_metadata.go:87 and client/utils.go:94,98. Reproduce the standard behavior described in the issue and trace why an empty line is emitted alongside each log record. Done means the driver emits only the actual log lines without separate empty events.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.