Merge ~seyeongkim/charm-prometheus2:functional_tests into charm-prometheus2:master

Proposed by Seyeong Kim
Status: Merged
Approved by: Eric Chen
Approved revision: 771506be9ff0a0a7ca6fdde408fc851f489d1678
Merged at revision: 1c23e272189b5bd5386b8eb00093fc90ab1a3d3e
Proposed branch: ~seyeongkim/charm-prometheus2:functional_tests
Merge into: charm-prometheus2:master
Diff against target: 64 lines (+26/-6)
1 file modified
src/tests/functional/tests/tests_prometheus.py (+26/-6)
Reviewer Review Type Date Requested Status
JamesLin Approve
🤖 prod-jenkaas-bootstack continuous-integration Approve
Erhan Sunar (community) Approve
Eric Chen Needs Information
BootStack Reviewers Pending
Review via email: mp+439359@code.staging.launchpad.net

Commit message

fix functional test in case dns_name has IP

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Eric Chen (eric-chen) wrote :

Why the dns_name sometimes is hostname, sometimes is IP?

review: Needs Information
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

I'm not sure.. for now I checked below function in reactive/prometheus.py

def update_prometheus_targets(target):

in this function dns_name is inserted with lookup(unit['hostname']) ( unit is from service["hosts"] )

and I printed that services["hosts"] , it is already includes IP instead of host.

lookup just returns IP I guess it can't find proper domain name in some circumstances.

Revision history for this message
Erhan Sunar (esunar) :
review: Approve
Revision history for this message
JamesLin (jneo8) wrote :

The target is a http interface.

According to the source code of http interface layer: https://github.com/juju-solutions/interface-http/blob/632131b1f122daf6fb601fd4c9f1e4dbb1a92e09/provides.py#L25

The target is possible to be either ip or hostname.
But it's better to explain this inside the code comment or doc-string.

review: Needs Information
Revision history for this message
JamesLin (jneo8) wrote :

Need small fix. Please see my inline comments.

review: Needs Fixing
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
JamesLin (jneo8) wrote :

LGTM

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 1c23e272189b5bd5386b8eb00093fc90ab1a3d3e

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: