Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Cepheus-CEP multitenancy issue on filtering requests #64

Open
ahmadessam opened this issue Dec 16, 2017 · 6 comments
Open

Cepheus-CEP multitenancy issue on filtering requests #64

ahmadessam opened this issue Dec 16, 2017 · 6 comments
Labels
bug multitenancy Support for Fiware-Service and Fiware-ServicePath

Comments

@ahmadessam
Copy link

ahmadessam commented Dec 16, 2017

I have made my cepheus-cep in mutitenant mode and then uploaded two config files with different servicepaths . Now , when i send any http request having the service and servicepath for either of the two tenants , the Cepheus-cep runs the last uploaded config file even if the servicepath in the incoming request is different . as far as i know , the cepheus-cep could filter the requests and accordingly run the config file corresponding to the service and servicepath in the request . I feel that the cepheus-cep caches only the last config file uploaded even in multitenancy mode .So What could be the issue in my case ??

@marcc-orange
Copy link
Contributor

Please provide some more info like logs. Helping you without logs is just not possible.

@ahmadessam
Copy link
Author

ahmadessam commented Dec 21, 2017

@marcc-orange
firstly i've uploaded my first config.json file with service cairouniversity and servicePath /fci/lab1
upload-fci-lab1
and then i upload another configuration file with service cairouniversity and servicepath /fci/lab2
upload-fci-lab2
i made a flask server receive the requests generated from the CEP after processing.
The problem is that when i send update to CEP with Fiware-Service: cairouniversity and Fiware -ServicePath:/fci/lab1 ,i receive the CEP output request with Fiware Service: cairouniversity and Fiware-ServicePath:/fci/lab2 which is different from that of the CEP incoming request.
i've printed service and servicePath in the tenantFilter file and found that the Fiware-Service: is cairouniversity and Fiware -ServicePath is /fci/lab1 and the tenant id is cairouniversity/fci/lab1
tenantfilter
and then I printed the httpheaders in the EventSinklistener to see the service and servicePath of the generated output and found out that the Fiware Service is cairouniversity and Fiware-ServicePath is /fci/lab2 which is incorrect and logically supposed to be /fci/lab1 as the incoming request as printed in the tenantFilter !
so it is changed at this point and become corrupted .
eventsinklistener

and then i received at my flask server the eventout request of the configration file of /fci/lab1 But with
Fiware Service: cairouniversity and Fiware-ServicePath:/fci/lab2
serverside

Hope my case right now is clear enough and that there could be a possible solution . Thanks !

@AhmadElseify
Copy link

AhmadElseify commented Jan 24, 2018

@marcc-orange
Now , We've edited the source code of the Cepheus and the problem is now solved completely and tested . So we're willing to publish it and need to know the steps to contribute to Fiware with this modification

@marcc-orange
Copy link
Contributor

Hi, you can clone the repo and submit us a pull request. We will review the modifications and merge your code once approved.
Thanks for your contribution !

@AhmadElseify
Copy link

AhmadElseify commented Jan 24, 2018

@marcc-orange
We've cloned the repository then edited and committed and that's the log . what should be done next ?
commit d6e49856110c51012af7562050c8c7559533fd89
Author: AhmadElseify ahmad.essam@ansr.cu.edu.eg
Date: Wed Jan 24 17:57:05 2018 +0200

@marcc-orange
Copy link
Contributor

Sorry, I did not mention creating a fork.
You need a github account to create a fork of our repo, then push your modification to a branch on this fork, then create a pull request.
More info about the process here : https://help.github.com/articles/about-pull-requests/

@marcc-orange marcc-orange added the multitenancy Support for Fiware-Service and Fiware-ServicePath label Jul 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug multitenancy Support for Fiware-Service and Fiware-ServicePath
Projects
None yet
Development

No branches or pull requests

3 participants