Skip to content
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

routing: dot in url gives 404 not found #71

Open
VallariAg opened this issue Jan 26, 2024 · 13 comments
Open

routing: dot in url gives 404 not found #71

VallariAg opened this issue Jan 26, 2024 · 13 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@VallariAg
Copy link
Member

In local setup, when there's a dot (".") in the url we get 404 not found.

Example run: vshankar-2024-01-25_13:52:19-fs-wip-vshankar-testing-20240125.044502-testing-default-smithi

To reproduce, start pulpito-ng locally and go to /runs/vshankar-2024-01-25_13:52:19-fs-wip-vshankar-testing-20240125.044502-testing-default-smithi

@VallariAg VallariAg added bug Something isn't working good first issue Good for newcomers labels Jan 26, 2024
@tech-rounak
Copy link

I would like to take this issue @VallariAg

@VallariAg
Copy link
Member Author

@tech-rounak sure, go ahead!
You can test it by going to /runs/xxx.xxx route after setting it up locally. Right now it'll show you 404 not found. When fixed, it will open the Run page (similar to what you would see at /runs/xxxxxx)

@tech-rounak
Copy link

tech-rounak commented Jan 26, 2024

hey @VallariAg I tried configuring the pulpit-ng repo
the server is running but, I don't know why there's no data showing up in the page
Do we need to configure some other project also..
Screenshot 2024-01-26 at 3 32 24 PM

@VallariAg
Copy link
Member Author

That's right!
You can setup teuthology locally, instructions are here: https://github.com/ceph/teuthology/tree/main/docs/docker-compose#teuthology-development-environment-instruction

And integrate pulpito-ng with the teuthology setup to see the data. Instructions to do that are in README: https://github.com/ceph/pulpito-ng?tab=readme-ov-file#integrate-with-teuthology-docker-setup

@tech-rounak
Copy link

tech-rounak commented Jan 26, 2024

Tried Following the steps mentioned on the docs
pulpito: build: context: ../../../pulpito-ng environment: REACT_APP_PADDLES_SERVER: http://0.0.0.0:8080 depends_on: paddles: condition: service_healthy teuthology_api: condition: service_healthy links: - paddles - teuthology_api healthcheck: test: [ "CMD", "curl", "-f", "http://0.0.0.0:8081" ] timeout: 5s interval: 10s retries: 2 ports: - 8081:8081

when I replace the pulpito services in teuthology docker compose file and run it,
it showing an error because the teuthology_api services is not present on the docker-compose file
And one more thing am using macOS, does the project require some other configuration..
I think the docker images are built for linux/amd64 while the architecture for my device is linux/arm64.

Do give your insights on this.

@VallariAg
Copy link
Member Author

VallariAg commented Jan 26, 2024

Hey, we have a project teuthology-api which is what that's referring to.
But you don't need to set that up for this issue particularly. You can replace the pulpito service with the below text, and it should work:

pulpito:
    build:
      context: ../../../pulpito-ng
    environment:
      VITE_PADDLES_SERVER: http://0.0.0.0:8080
    depends_on:
      paddles:
        condition: service_healthy
    links:
      - paddles
    healthcheck:
      test: [ "CMD", "curl", "-f", "http://0.0.0.0:8081" ]
      timeout: 5s
      interval: 10s
      retries: 2
    ports:
      - 8081:8081

If running teuthology in wait mode, you wouldn't see any runs on pulpito. If you wanna explore that, you can schedule runs from inside of the teuthology container:

docker exec e886a6b3632f /teuthology/virtualenv/bin/teuthology-suite  --suite teuthology:no-ceph -m testnode --ceph-repo https://github.com/ceph/ceph.git --suite-repo https://github.com/ceph/ceph.git -c main -p 75 --filter-out "libcephfs,kclient,stream,centos,rhel" -d ubuntu -D 20.04 --limit 1 /teuthology/containerized_node.yaml

(here e886a6b3632f is the teuthology container ID)

Then you'll see a run appear on pulpito.

I don't think you should face any problem setting this up in arm64 arch, I use the same machine. I have setup docker using rancher desktop so maybe that might help.

@tech-rounak
Copy link

tech-rounak commented Jan 27, 2024

Docker is up and running, but while execting the below command for scheduling runs in pulpito getting an error

docker exec e886a6b3632f /teuthology/virtualenv/bin/teuthology-suite  --suite teuthology:no-ceph -m testnode --ceph-repo https://github.com/ceph/ceph.git --suite-repo https://github.com/ceph/ceph.git -c main -p 75 --filter-out "libcephfs,kclient,stream,centos,rhel" -d ubuntu -D 20.04 --limit 1 /teuthology/containerized_node.yaml
Screenshot 2024-01-27 at 3 06 27 PM

@VallariAg
Copy link
Member Author

Try running this teuthology-suite command:

teuthology-suite  --suite teuthology:no-ceph -m testnode --suite-repo https://github.com/ceph/ceph.git -c main -p 75 --filter-out "libcephfs,kclient,stream,centos,rhel" -d ubuntu -D 20.04 --limit 1

@tech-rounak
Copy link

teuthology-suite is not installed, I am using docker to install everything. Is there any other resource where the proper installation of teuthology is present.

@VallariAg
Copy link
Member Author

I meant run the teuthology-suite command inside docker, sorry for the confusion!

docker exec e886a6b3632f /teuthology/virtualenv/bin/teuthology-suite  --suite teuthology:no-ceph -m testnode --suite-repo https://github.com/ceph/ceph.git -c main -p 75 --filter-out "libcephfs,kclient,stream,centos,rhel" -d ubuntu -D 20.04 --limit 1

In production env, teuthology commands are run from ceph's teuthology machines. You can read about the workflow here: https://docs.ceph.com/en/quincy/dev/developer_guide/testing_integration_tests/tests-integration-testing-teuthology-workflow/#triggering-tests
This docker environment creates a local setup of it.

@tech-rounak
Copy link

Screenshot 2024-02-02 at 8 41 17 PM Screenshot 2024-02-02 at 8 43 58 PM

Thanks for the help the jobs are getting scheduled and everything is up !
But as per the image I don't see any issue in url with dot in it, and
second is why I am not to able to view the runs in pulpito even when the test are scheduled

@VallariAg
Copy link
Member Author

VallariAg commented Feb 5, 2024

But as per the image I don't see any issue in url with dot in it, and

Oh! So the error happens only when we go to url without a trailing slash like /xxx.xxx, and /xxx.xxx/ is working fine. We can definitely add a trailing slash here:

<IconLink to={`/runs/${params.value}`}>

Maybe we can add some redirect rule in config to add trailing slashes too?

second is why I am not to able to view the runs in pulpito even when the test are scheduled

Make sure the paddles url is pointing correctly to the local paddles container.

@tech-rounak
Copy link

tech-rounak commented Feb 5, 2024

Make sure the paddles url is pointing correctly to the local paddles container.

yeah its pointing to the correct paddles container on port 8080.

Oh! So the error happens only when we go to url without a trailing slash like /xxx.xxx, and /xxx.xxx is working fine. We can definitely add a trailing slash here:

I checked it without the trailing slash also the error's not showing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants