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 2021/06/01 23:06:39 UTC

[GitHub] [trafficcontrol] zrhoffman opened a new issue #5903: t3c Integration Tests: could not get status for service 'trafficserver'

zrhoffman opened a new issue #5903:
URL: https://github.com/apache/trafficcontrol/issues/5903


   <!--
   ************ STOP!! ************
   If this issue identifies a security vulnerability, DO NOT submit it! Instead, contact
   the Apache Traffic Control Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://www.apache.org/security/ regarding vulnerability disclosure.
   
   - For *SUPPORT QUESTIONS*, use the #traffic-control channel on the ASF slack (https://s.apache.org/slack-invite)
   or Traffic Control mailing lists (https://trafficcontrol.apache.org/mailing_lists).
   - Before submitting, please **SEARCH GITHUB** for a similar issue or PR.
   -->
   
   ## I'm submitting a ...
   <!-- delete all those that don't apply -->
   <!--- security vulnerability (STOP!! - see above)-->
   -  bug report
   
   ## Traffic Control components affected ...
   <!-- delete all those that don't apply -->
   -  TC Cache Config (integration tests)
   
   ## Current behavior:
   <!-- Describe how the bug manifests -->
   Currently, `ort_test` container in the the t3c integration tests use a `systemctl` shim that returns exit code 0 if the service provided is `trafficserver` (without printing anything or starting/stopping `trafficserver`).
   
   If the t3c integration tests are made to use [the version of this shim that CDN in a Box uses](https://github.com/apache/trafficcontrol/blob/4254cbce80/infrastructure/cdn-in-a-box/cache/systemctl.sh), which passes the command given to the `trafficserver` initscript and returns the exit code as follows:
   
   `systemctl` command | `trafficserver` initscript command
   -- | --
   `systemctl start trafficserver` | `trafficserver start`
   `systemctl stop trafficserver` | `trafficserver stop`
   `systemctl status trafficserver` | `trafficserver status`
   `systemctl enable trafficserver` | <code>echo "Created symlink /etc/systemd/system/sockets.target.wants/$(basename "$service_file") → ${service_file}."</code>
   
   then the integration tests will fail when trying to check the status of trafficserver:
   
   ```go
   [...]
   DEBUG: torequest.go:513: 2021-06-01T22:41:39.43950936Z: Setting change applied for 'set_dscp_37.config'
       t3c-apply-unset-update_test.go:109: TestT3cTOUpdates t3cUpdateUnsetFlag stdout '''set TSHome from the RPM config file  list '/opt/trafficserver'
           TSHome: /opt/trafficserver, TSConfigDir: /opt/trafficserver/etc/trafficserver
           [...]
           INFO: cmd.go:292: 2021-06-01T22:41:39.439528155Z: t3c-check-reload calling with mode 'syncds' pluginPackagesInstalled '[]' changedConfigFiles '[/opt/trafficserver/etc/trafficserver/hdr_rw_first_ds-top.config/hdr_rw_first_ds-top.config /opt/trafficserver/etc/trafficserver/dscp/set_dscp_37.config/set_dscp_37.config]'
           INFO: torequest.go:1084: 2021-06-01T22:41:39.446012351Z: t3c-check-reload returned 'reload'
           INFO: torequest.go:632: 2021-06-01T22:41:39.446032445Z: IsPackageInstalled 'trafficserver' found 'trafficserver-8.1.1-44.c4e4170.el7.x86_64' in cache, returning true
           ERROR: t3c-apply.go:185: 2021-06-01T22:41:39.466826917Z: failed to start services: getting trafficserver service status: could not get status for service 'trafficserver'
           
           '''
   INFO: t3c-request.go:96: 2021-06-01T22:41:39.473264823Z: configuration initialized
   INFO: client.go:52: 2021-06-01T22:41:39.473296799Z: URL: 'https://to_server:443' User: 'admin' Pass len: '6'
   INFO: client.go:55: 2021-06-01T22:41:39.473309366Z: TO URL string: 'https://to_server:443'
   INFO: client.go:56: 2021-06-01T22:41:39.473321673Z: TO URL: 'https://to_server:443'
   INFO: client.go:67: 2021-06-01T22:41:39.595702247Z: toreqnew.New Logged into in to Traffic Ops '172.19.0.5:443'
   INFO: getdata.go:79: 2021-06-01T22:41:39.596255835Z: Getting data 'update-status'
   INFO: torequtil.go:60: 2021-06-01T22:41:39.601517275Z: GetRetry server_update_status_atlanta-edge-03 retries 0 took 5ms
       t3c-apply-unset-update_test.go:127: expected UpdatePending false after syncds run
       types.go:58: ---- DeleteTestTypes ----
   User: traffic_ops, Password: len 6, Hostname: db, DB: traffic_ops
   ------------- End of TestT3cUnsetsUpdateFlag tests ---------------
   --- FAIL: TestT3cUnsetsUpdateFlag (89.84s)
   FAIL
   exit status 1
   FAIL	github.com/apache/trafficcontrol/cache-config/testing/ort-tests	90.387s
   ERROR: ORT tests failure
   ```
   
   
   ## Expected behavior:
   <!-- Describe what the behavior would be without the bug -->
   The t3c integration tests should successfully start Apache Traffic Server.
   
   ## Minimal reproduction of the problem with instructions:
   <!--
   If the current behavior is a bug, please provide the *STEPS TO REPRODUCE* and
   include the applicable TC version.
   -->
   1.  ```shell
       cp infrastructure/cdn-in-a-box/cache/systemctl.sh cache-config/testing/docker/ort_test/systemctl.sh
       ```
   
   2. Place the RPMs and build the Docker images for the t3c integration tests
   
   3. Run the t3c integration tests
   
   <!--
   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
   
       https://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.
   -->
   


-- 
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



[GitHub] [trafficcontrol] rob05c commented on issue #5903: t3c Integration Tests: could not get status for service 'trafficserver'

Posted by GitBox <gi...@apache.org>.
rob05c commented on issue #5903:
URL: https://github.com/apache/trafficcontrol/issues/5903#issuecomment-852562235


   @jrushford is working on getting the t3c integration tests to start ATS for testing


-- 
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



[GitHub] [trafficcontrol] zrhoffman closed issue #5903: t3c Integration Tests: could not get status for service 'trafficserver'

Posted by GitBox <gi...@apache.org>.
zrhoffman closed issue #5903:
URL: https://github.com/apache/trafficcontrol/issues/5903


   


-- 
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



[GitHub] [trafficcontrol] zrhoffman closed issue #5903: t3c Integration Tests: could not get status for service 'trafficserver'

Posted by GitBox <gi...@apache.org>.
zrhoffman closed issue #5903:
URL: https://github.com/apache/trafficcontrol/issues/5903


   


-- 
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