canonical / canonical/cos-proxy-operator

ipv6 used by default for vector

Open
#223 2 comments 0 reactions 0 assignees View on GitHub
Status: Triage Type: Bug
Dominant language
Python
Stars
3
Forks
12
PR merge metrics
No merged PRs in 30d

Description

### Bug Description

Hello team,

In a recent kubernetes cloud deployment with cos, I deployed below version of cos-proxy. But that was causing HostDown alert on prometheus. When we checked vector inside juju unit, that was failing to work due to ipv6 disabled in our environment.

```App Version Status Scale Charm Channel Rev Exposed Message
cos-proxy n/a active 1 cos-proxy 1/stable 155 no
```
As a workaround: We modified ipv6 address to ipv4 inside /etc/vector/aggregator/vector.yaml

api:
address: '0.0.0.0:8686'
enabled: true
playground: false
data_dir: /var/lib/vector
enrichment_tables:
nrpe:
file:
encoding:
type: csv
path: /etc/vector/nrpe_lookup.csv
schema:
command: string
composite_key: string
ipaddr: string
juju_application: string
juju_unit: string
type: file
sinks:
prom_exporter:
address: '0.0.0.0:9090'

Image

### To Reproduce

juju deploy cos-proxy --to lxd:1 --channel=1/stable --revision=155
juju ssh cos-proxy/0
$ sudo nano /etc/default/grub // add GRUB_CMDLINE_LINUX="ipv6.disable=1"
$ reboot
juju relate cos-proxy:juju-info grafana-agent-container:juju-info
juju relate cos-proxy:juju-info nrpe:general-info
juju relate cos-proxy:downstream-prometheus-scrape cos-scrape-interval-config-monitors:configurable-scrape-jobs
juju relate cos-proxy:downstream-prometheus-scrape cos-scrape-interval-config-metrics:configurable-scrape-jobs

And check for vector service status inside cos-proxy unit

### Environment

Juju based deployment

### Relevant log output

```shell
ubuntu@juju-7e8c8e-1-lxd-0:/etc/vector/aggregator$ sudo VECTOR_CONFIG_YAML=/etc/vector/aggregator/vector.yaml /usr/local/bin/vector -w
2025-10-22T11:31:56.086524Z INFO vector::app: Log level is enabled. level="info"
2025-10-22T11:31:56.095053Z INFO vector::config::watcher: Creating configuration file watcher.
2025-10-22T11:31:56.098744Z INFO vector::config::watcher: Watching configuration files.
2025-10-22T11:31:56.098808Z INFO vector::app: Loading configs. paths=["/etc/vector/aggregator/vector.yaml"]
2025-10-22T11:31:56.109795Z INFO source{component_kind="source" component_id=host_metrics component_type=host_metrics}: vector::sources::host_metrics: PROCFS_ROOT is unset. Using default '/proc' for procfs root.
2025-10-22T11:31:56.109824Z INFO source{component_kind="source" component_id=host_metrics component_type=host_metrics}: vector::sources::host_metrics: SYSFS_ROOT is unset. Using default '/sys' for sysfs root.
2025-10-22T11:31:56.125514Z INFO vector::topology::running: Running healthchecks.
2025-10-22T11:31:56.125638Z INFO vector: Vector has started. debug="false" version="0.44.0" arch="x86_64" revision="3cdc7c3 2025-01-13 21:26:04.735691656"
2025-10-22T11:31:56.125647Z INFO vector::topology::builder: Healthcheck passed.
2025-10-22T11:31:56.125666Z INFO vector::topology::builder: Healthcheck passed.
2025-10-22T11:31:56.125817Z INFO source{component_kind="source" component_id=logstash component_type=logstash}: vector::sources::util::net::tcp: Listening. addr=0.0.0.0:5044
2025-10-22T11:31:56.126099Z INFO vector::sinks::prometheus::exporter: Building HTTP server. address=0.0.0.0:9090
2025-10-22T11:31:56.126563Z INFO source{component_kind="source" component_id=nrpe-logs component_type=journald}: vector::sources::journald: Starting journalctl.
2025-10-22T11:31:56.129025Z ERROR vector::internal_events::socket: Error binding socket. error=error creating server listener: Address family not supported by protocol (os error 97) error_code="socket_bind" error_type="io_failed" stage="receiving" mode=tcp internal_log_rate_limit=true
2025-10-22T11:31:56.129132Z ERROR vector::app: An error occurred that Vector couldn't handle: error creating server listener: Address family not supported by protocol (os error 97).
2025-10-22T11:31:56.129177Z INFO vector: Vector has stopped.
2025-10-22T11:31:56.130638Z INFO vector::topology::running: Shutting down... Waiting on running components. remaining_components="host_metrics, prom_exporter" time_remaining="59 seconds left"
```

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Find the charm code responsible for /etc/vector/aggregator/vector.yaml, then reproduce the supplied Juju deployment with IPv6 disabled and inspect Vector's socket-binding failure. Done means Vector starts without manually changing the configuration, its listeners use addresses supported by the environment, and the HostDown alert no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, prometheus, python
Domain
devops, infrastructure, observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.