-
Notifications
You must be signed in to change notification settings - Fork 346
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
Update cdn config (Remove hypnotoad section and update listen field) #7450
Conversation
ea75812
to
3987e17
Compare
Codecov Report
@@ Coverage Diff @@
## master #7450 +/- ##
============================================
- Coverage 33.31% 30.34% -2.97%
Complexity 98 98
============================================
Files 499 790 +291
Lines 50832 82623 +31791
Branches 851 851
============================================
+ Hits 16937 25076 +8139
- Misses 32655 55435 +22780
- Partials 1240 2112 +872
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 292 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
b2a3606
to
1b02b8d
Compare
91f5a2f
to
ab2cd04
Compare
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.
Just some unused variables to clean up, besides that it all looks good!
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.
It doesn't have to be in this PR, but in the future, we should remove this postinstall question, since it serves no purpose.
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.
Postinstall fails in CDN in a Box. Opening the ciab-logs
artifact and inspecting trafficops.log
:
trafficops_1 | 2023-05-12T18:22:47.518203240Z ++ /opt/traffic_ops/install/bin/postinstall --debug -a --cfile /opt/traffic_ops/install/bin/input.json -n --no-restart-to
trafficops_1 | 2023-05-12T18:22:47.591300943Z INFO:root:Starting postinstall
trafficops_1 | 2023-05-12T18:22:47.591504548Z INFO:root:Debug is on
trafficops_1 | 2023-05-12T18:22:47.591640751Z INFO:root:Running in automatic mode
trafficops_1 | 2023-05-12T18:22:47.591876057Z INFO:root:Using input file /opt/traffic_ops/install/bin/input.json
trafficops_1 | 2023-05-12T18:22:47.592441670Z INFO:root:Adding question 'Port to serve on?' with default answer 443
trafficops_1 | 2023-05-12T18:22:47.592617774Z INFO:root:Adding question 'ldap.conf location?' with default answer /opt/traffic_ops/app/conf/ldap.conf
trafficops_1 | 2023-05-12T18:22:47.592754277Z INFO:root:Adding question 'LDAP server hostname' with default answer
trafficops_1 | 2023-05-12T18:22:47.592908081Z INFO:root:Adding question 'LDAP Admin Password' with default answer
trafficops_1 | 2023-05-12T18:22:47.593045684Z INFO:root:Adding question 'LDAP Search Query' with default answer
trafficops_1 | 2023-05-12T18:22:47.593192587Z INFO:root:Adding question 'LDAP Skip TLS verify' with default answer
trafficops_1 | 2023-05-12T18:22:47.593316090Z INFO:root:Adding question 'LDAP Timeout Seconds' with default answer
trafficops_1 | 2023-05-12T18:22:47.593457794Z INFO:root:File sanity check complete - found 7 differences
trafficops_1 | 2023-05-12T18:22:47.593586597Z INFO:root:===========/opt/traffic_ops/app/conf/production/database.conf===========
trafficops_1 | 2023-05-12T18:22:47.594050207Z INFO:root:Database configuration has been saved
trafficops_1 | 2023-05-12T18:22:47.594551519Z INFO:root:===========/opt/traffic_ops/app/conf/production/tv.conf===========
trafficops_1 | 2023-05-12T18:22:47.594916027Z INFO:root:Database configuration has been saved
trafficops_1 | 2023-05-12T18:22:47.595348438Z INFO:root:Not setting up ldap
trafficops_1 | 2023-05-12T18:22:47.595526342Z INFO:root:===========/opt/traffic_ops/install/data/json/users.json===========
trafficops_1 | 2023-05-12T18:22:47.679911908Z INFO:root:===========/opt/traffic_ops/install/data/json/openssl_configuration.json===========
trafficops_1 | 2023-05-12T18:22:47.680141114Z INFO:root:===========/opt/traffic_ops/install/data/json/profiles.json===========
trafficops_1 | 2023-05-12T18:22:47.680560923Z INFO:root:Not generating openssl certification
trafficops_1 | 2023-05-12T18:22:47.680722927Z INFO:root:===========/opt/traffic_ops/app/conf/cdn.conf===========
trafficops_1 | 2023-05-12T18:22:47.683847700Z Traceback (most recent call last):
trafficops_1 | 2023-05-12T18:22:47.683861500Z File "/opt/traffic_ops/install/bin/_postinstall.py", line 994, in generate_cdn_conf
trafficops_1 | 2023-05-12T18:22:47.683865500Z existing_conf = json.load(conf_file)
trafficops_1 | 2023-05-12T18:22:47.683868800Z File "/usr/lib64/python3.6/json/__init__.py", line 299, in load
trafficops_1 | 2023-05-12T18:22:47.683872300Z parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
trafficops_1 | 2023-05-12T18:22:47.683875301Z File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
trafficops_1 | 2023-05-12T18:22:47.683878501Z return _default_decoder.decode(s)
trafficops_1 | 2023-05-12T18:22:47.683914801Z File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
trafficops_1 | 2023-05-12T18:22:47.683929002Z obj, end = self.raw_decode(s, idx=_w(s, 0).end())
trafficops_1 | 2023-05-12T18:22:47.683932102Z File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
trafficops_1 | 2023-05-12T18:22:47.683935102Z raise JSONDecodeError("Expecting value", s, err.value) from None
trafficops_1 | 2023-05-12T18:22:47.683938102Z json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
trafficops_1 | 2023-05-12T18:22:47.683941002Z
trafficops_1 | 2023-05-12T18:22:47.683943702Z The above exception was the direct cause of the following exception:
trafficops_1 | 2023-05-12T18:22:47.683946702Z
trafficops_1 | 2023-05-12T18:22:47.683949402Z Traceback (most recent call last):
trafficops_1 | 2023-05-12T18:22:47.683952202Z File "/opt/traffic_ops/install/bin/_postinstall.py", line 1519, in <module>
trafficops_1 | 2023-05-12T18:22:47.683955702Z ARGS.no_database
trafficops_1 | 2023-05-12T18:22:47.683958602Z File "/opt/traffic_ops/install/bin/_postinstall.py", line 1322, in main
trafficops_1 | 2023-05-12T18:22:47.683961603Z postgresTV = generate_cdn_conf(user_input[CDN_CONF_FILE], CDN_CONF_FILE, automatic, root_dir)
trafficops_1 | 2023-05-12T18:22:47.683964503Z File "/opt/traffic_ops/install/bin/_postinstall.py", line 998, in generate_cdn_conf
trafficops_1 | 2023-05-12T18:22:47.683967503Z raise exception
trafficops_1 | 2023-05-12T18:22:47.683970303Z ValueError: invalid existing cdn.config at /opt/traffic_ops/app/conf/cdn.conf: Expecting value: line 2 column 1 (char 1)
trafficops_1 | 2023-05-12T18:22:47.690645158Z Error on line 38 of /opt/traffic_ops/install/bin/postinstall
trafficops_1 | 2023-05-12T18:22:47.691045368Z +++ echo 'Error on line 216 of /run-go.sh'
trafficops_1 | 2023-05-12T18:22:47.691131170Z Error on line 216 of /run-go.sh
trafficops_1 | 2023-05-12T18:22:47.691199471Z +++ exit 1
What question is it? |
7e2b3bf
to
7390acc
Compare
Whoops, meant to link the Number of workers? question
|
I looked at the traceback and the line (998) where the error is being generated and it is not informative. |
The error is happening at the top line of the stack trace:
so
|
116eb96
to
2163668
Compare
…ield since invalidationjobs (L671) uses URL field of Config struct.
2163668
to
c332c53
Compare
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.
Looks great!
Remove hypnotoad section and move cert and key fields to traffic_ops_golang section. The cert and key fields are required to run traffic_ops.
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Ensure that you are able to run traffic_ops either locally or with CIAB and run a few API to ensure they give the expected results. Will need to change your local cdn conf (traffic_ops_golang section) if you run traffic_ops locally).
If this is a bugfix, which Traffic Control versions contained the bug?
N/A
PR submission checklist