You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/02/05 15:03:34 UTC

[GitHub] [trafficcontrol] zrhoffman opened a new pull request #4375: Debug TM, TO, or TO Perl CDN-in-a-Box containers

zrhoffman opened a new pull request #4375: Debug TM, TO, or TO Perl CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375
 
 
   <!--
   ************ STOP!! ************
   If this Pull Request is intended to fix a security vulnerability, DO NOT submit it! Instead, contact
   the Apache Software Foundation Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://www.apache.org/security/ regarding vulnerability disclosure.
   -->
   ## What does this PR (Pull Request) do?
   <!-- Explain the changes you made here. If this fixes an Issue, identify it by
   replacing the text in the checkbox item with the Issue number e.g.
   
   - [x] This PR fixes #9001 OR is not related to any Issue
   
   ^ This will automatically close Issue number 9001 when the Pull Request is
   merged (The '#' is important).
   
   Be sure you check the box properly, see the "The following criteria are ALL
   met by this PR" section for details.
   -->
   This PR lets you use CDN-in-a-Box to debug Traffic Monitor, Traffic Ops, and Traffic Ops Perl and adds configuration options so that this behavior is only enabled when desired.
   - [x] This PR is not related to any Issue
   
   ## Which Traffic Control components are affected by this PR?
   <!-- Please delete all components from this list that are NOT affected by this
   Pull Request. Also, feel free to add the name of a tool or script that is
   affected but not on the list.
   
   Additionally, if this Pull Request does NOT affect documentation, please
   explain why documentation is not required. -->
   
   - CDN in a Box
   - Documentation
   - Traffic Monitor
   - Traffic Ops
   
   ## What is the best way to verify this PR?
   <!-- Please include here ALL the steps necessary to test your Pull Request. If
   it includes tests (and most should), outline here the steps needed to run the
   tests. If not, lay out the manual testing procedure and please explain why
   tests are unnecessary for this Pull Request. -->
   * Build documentation to make sure there are no warnings
   * Make sure documentation is accurate and easy to follow
   * Ensure RPMs and CDN-in-a-Box build
   * Check whether debugging works in CDN-in-a-Box for:
       - Traffic Monitor
       - Traffic Ops
       - Traffic Ops Perl
   
   * Check that no debugging information or behavior is included when debug flags and variables are not used.
       - When `pkg` is used instead of `pkg -d`, or CiaB's `make` is used instead of `make debug`, the `traffic_monitor` and `traffic_ops_golang` binaries should be roughly 2 MB smaller.
       - In CiaB's `variables.env`, if `DEBUGGING_TM`, `DEBUGGING_TO`, or `DEBUGGING_TO_PERL` are not set to true, timeouts should be short (60 seconds or less) and the services should not try to use Delve or Devel::Camelcadedb to run.
   
   * Jenkins should be able to build everything. That is essentially our test for the build scripts and docker environment.
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   <!-- If this PR fixes a bug, please list here all of the affected versions - to
   the best of your knowledge. It's also pretty helpful to include a commit hash
   of where 'master' is at the time this PR is opened (if it affects master),
   because what 'master' means will change over time. For example, if this PR
   fixes a bug that's present in master (at commit hash '2697ebac'), in v3.0.0,
   and in the current 3.0.1 Release candidate (e.g. RC1), then this list would
   look like:
   
   - master (2697ebac)
   - 3.0.0
   - 3.0.1 (RC1)
   
   If you don't know what other versions might have this bug, AND don't know how
   to find the commit hash of 'master', then feel free to leave this section
   blank (or, preferably, delete it entirely).
    -->
   Not a bug fix.
   
   ## The following criteria are ALL met by this PR
   <!-- Check the boxes to signify that the associated statement is true. To
   "check a box", replace the space inside of the square brackets with an 'x'.
   e.g.
   
   - [ x] <- Wrong
   - [x ] <- Wrong
   - [] <- Wrong
   - [*] <- Wrong
   - [x] <- Correct!
   
   -->
   
   - [x] This PR includes tests OR I have explained why tests are unnecessary
   - [x] This PR includes documentation OR I have explained why documentation is unnecessary
   - [x] This PR includes an update to CHANGELOG.md.
   - [x] This PR includes any and all required license headers
   - [x] This PR does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details)
   
   
   ## Additional Information
   <!-- If you would like to include any additional information on the PR for
   potential reviewers please put it here.
   
   Some examples of this would be:
   
   - Before and after screenshots/gifs of the Traffic Portal if it is affected
   - Links to other dependent Pull Requests
   - References to relevant context (e.g. new/updates to dependent libraries,
   mailing list records, blueprints)
   
   Feel free to leave this section blank (or, preferably, delete it entirely).
   -->
   
   <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
   -->
   Debugging can be useful for a developer's own analysis, but it in no way replaces tests.
   
   Comments, feedback, suggestions, and criticism are welcome.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 edited a comment on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
ocket8888 edited a comment on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613704086
 
 
   > _"Your GOPATH is `/home/ocket8888`?"_
   
   yes
   
   > _"Assuming that your workspace root is your git working tree, `/home/ocket8888/src/github.com/apache/trafficcontrol`..."_
   
   Idk what a "workspace root" is, but I assume it's the folder I have open in VSCode? Because then yes.
   
   This configuration also doesn't pause on breakpoints:
   ```json
   {
       "version": "0.2.0",
       "configurations": [
           {
               "name": "Launch",
               "type": "go",
               "request": "attach",
               "mode": "remote",
               "cwd": "${workspaceRoot}/traffic_ops/traffic_ops_golang",
               "remotePath": "/opt/traffic_ops/app/bin/traffic_ops_golang",
               "port": 2345,
               "host": "127.0.0.1",
               "showLog": true
           }
       ]
   }
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-612222660
 
 
   Well, now the containers start up, but the enroller is waiting on TO, TO is waiting on Perl, and Perl is waiting on the enroller:
   ```
   enroller_1         | + nc -z trafficops.infra.ciab.test 443
   enroller_1         | + echo 'Waiting for https://trafficops.infra.ciab.test:443'
   enroller_1         | + sleep 5
   enroller_1         | Waiting for https://trafficops.infra.ciab.test:443
   trafficops-perl_1  | + [[ -f /shared/enroller/enroller-started ]]
   trafficops-perl_1  | + echo 'waiting for enroller'
   trafficops-perl_1  | + sleep 3
   trafficops-perl_1  | waiting for enroller
   trafficops_1       | + nc trafficops-perl.infra.ciab.test 443
   trafficops_1       | waiting for trafficops-perl.infra.ciab.test:443
   trafficops_1       | + echo 'waiting for trafficops-perl.infra.ciab.test:443'
   trafficops_1       | + sleep 3
   ```
   resulting in total deadlock. Which probably means one of the TO servers (or both) failed to start and/or listen on the correct port. I didn't find anything glaring in the logs, though.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613694601
 
 
   After changing `cwd` to be relative to the workspace root, your `attach` configuration works for me.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 edited a comment on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
ocket8888 edited a comment on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-612149792
 
 
   I can't get the debug configuration to start up. None of the `-nondebug` containers can be started, they all say:
   ```
   ERROR: for cdn-in-a-box_trafficops-perl-nondebug_1  Cannot start service trafficops-perl-nondebug: network a74043e2314f828751aeb9b90594c863e210597b1be710b029c4260c673fa444 not found
   ```
   I started it using: `docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f ./optional/docker-compose.debugging.yml up -d --build` - builds all went fine.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613165149
 
 
   The remote path refers to where the binary was built, not where it currently sits. In your config, `request` needs to be `"launch"` and `remotePath` needs to be `"/tmp/go/src/github.com/apache/trafficcontrol/traffic_monitor"`.
   
   I added an example config for vscode in 71cc81c29e.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613123838
 
 
   Well now I can get things to build and run, but I can't set breakpoints in TO. I tried to set one at [one of the steps in the `/ping` endpoint handler](https://github.com/apache/trafficcontrol/blob/master/traffic_ops/traffic_ops_golang/ping/ping.go#L31) as well as your suggested line in Profile.Read. Neither worked. Here's my config:
   ```json
   {
       "version": "0.2.0",
       "configurations": [
           {
               "name": "Launch",
               "type": "go",
               "request": "attach",
               "mode": "remote",
               "program": "/home/ocket8888/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/",
               "remotePath": "/opt/traffic_ops/app/bin/traffic_ops_golang",
               "port": 2345,
               "host": "127.0.0.1",
               "showLog": true
           }
       ]
   }

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613204064
 
 
   That's odd. It tells me that "launch" is deprecated with "remote" mode.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613680707
 
 
   Alright, well I nuked everything and rebuilt it again, and it still doesn't break on breakpoints. I used this debugger config:
   ```json
   {
       "version": "0.2.0",
       "configurations": [
           {
               "name": "Launch",
               "type": "go",
               "request": "attach",
               "mode": "remote",
               "cwd": "/home/ocket8888/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/",
               "remotePath": "/tmp/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang",
               "port": 2345,
               "host": "127.0.0.1",
               "showLog": true
           }
       ]
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-611696357
 
 
   Does anyone have thoughts about this PR? Does anything need to change?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-612229911
 
 
   It can be helpful to remove all images, just to make sure there is no issues related to caching. I do that with some frequency when switching branches, using [cb_rebuild_everything](https://github.com/zrhoffman/rc-files/blob/98ec8b5243/bash/bashrc.atc#L719-L732).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-612240121
 
 
   Ah I see. Yes that will work, but since Perl debugging is enabled, you have to connect to the Perl process with your IDE before it will continue (otherwise you would not be able to set breakpoints). I explained why [in the docs](https://github.com/zrhoffman/trafficcontrol/blob/debug_cdn-in-a-box/docs/source/development/debugging.rst#traffic-ops-perl):
   
   > Camelcadedb has the limitation that new breakpoints are only recognized if you set them while the debugger is at a breakpoint or before the IDE connects.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-612238598
 
 
   oh, I did a full `docker system prune -af` before that command
   and that is me running with debugging turned on for every container

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-612223478
 
 
   If you have no debug configuration enabled, then that's just CiaB's normal "works most of the time" behavior, restarting should fix

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman edited a comment on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman edited a comment on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613165149
 
 
   The remote path refers to where the binary was built, not where it currently sits. In your config, `request` needs to be `"launch"` and `remotePath` needs to be `"/tmp/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang"`.
   
   I added an example config for vscode in 71cc81c29e.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613704086
 
 
   > _"Your GOPATH is `/home/ocket8888`?"_
   
   yes
   
   > _"Assuming that your workspace root is your git working tree, `/home/ocket8888/src/github.com/apache/trafficcontrol`..."_
   
   Idk what a "workspace root" is, but I assume it's the folder I have open in VSCode? Because then yes.
   
   This configuration also doesn't pause on breakpoints:
   ```json
   {
       "version": "0.2.0",
       "configurations": [
           {
               "name": "Launch",
               "type": "go",
               "request": "attach",
               "mode": "remote",
               "cwd": "/home/ocket8888/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/",
               "remotePath": "${workspaceRoot}/traffic_ops/traffic_ops_golang",
               "port": 2345,
               "host": "127.0.0.1",
               "showLog": true
           }
       ]
   }
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613686685
 
 
   Your GOPATH is `/home/ocket8888`?
   
   Assuming that your workspace root is your git working tree, `/home/ocket8888/src/github.com/apache/trafficcontrol`, it might better to use a `cwd` relative to the workspace root: `"${workspaceRoot}/traffic_ops/traffic_ops_golang"`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 merged pull request #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
ocket8888 merged pull request #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-612172878
 
 
   The branch didn't have the Postgres repo RPM URL fix (a5edc1ca82). Rebased onto master. It should work now, the rebase is the version I have been using.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613724113
 
 
   The Traffic Ops RPM should be built with either `make debug` or `make debug traffic_ops/traffic_ops.rpm`. Otherwise, the debugger could fail to break at some lines and will be missing variable info.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-612149792
 
 
   I can't get the debug configuration to start up. None of the `-nondebug` containers can be started, they all say:
   ```
   ERROR: for cdn-in-a-box_trafficops-perl-nondebug_1  Cannot start service trafficops-perl-nondebug: network a74043e2314f828751aeb9b90594c863e210597b1be710b029c4260c673fa444 not found
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613767617
 
 
   Your `remotePath` became `"/opt/traffic_ops/app/bin/traffic_ops_golang"` again. It needs to be `"/tmp/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang"`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613439345
 
 
   VS Code Go's [remote debugging documentation](https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code#remote-debugging) says to use `launch`, but it seems to be working with `attach` if the `program` key is changed to `cwd` (updated docs in 9c50eed84a).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 edited a comment on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
ocket8888 edited a comment on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-613680707
 
 
   Alright, well I nuked everything and rebuilt it again, and it still doesn't break on breakpoints. I used this debugger config:
   ```json
   {
       "version": "0.2.0",
       "configurations": [
           {
               "name": "Launch",
               "type": "go",
               "request": "attach",
               "mode": "remote",
               "cwd": "/home/ocket8888/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/",
               "remotePath": "/tmp/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang",
               "port": 2345,
               "host": "127.0.0.1",
               "showLog": true
           }
       ]
   }
   ```
   and I also tried:
   ```json
   {
       "version": "0.2.0",
       "configurations": [
           {
               "name": "Launch",
               "type": "go",
               "request": "launch",
               "mode": "remote",
               "program": "/home/ocket8888/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/",
               "remotePath": "/tmp/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang",
               "port": 2345,
               "host": "127.0.0.1",
               "showLog": true
           }
       ]
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-612224105
 
 
   Traffic Ops Perl now needs `TO_PERL_SCHEME` set, but the default `variables.env` should provide that.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #4375: Debug TM, TO, TO Perl, or TR CDN-in-a-Box containers
URL: https://github.com/apache/trafficcontrol/pull/4375#issuecomment-614160620
 
 
   right :facepalm: 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services