-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Support for netbox 4.x #176
Comments
Yep it's broken at the moment. |
Can I do something to fix it, or must I wait until a new Version of Proxbox is coming out? |
This comment was marked as duplicate.
This comment was marked as duplicate.
Why do you not make a new release for 4.x? I already see commit. |
The github version installs on 4.x, but it still doesn't seem to work on the latest netbox release |
I'm having the same problem with Netbox 4.1.1. When trying to run python3 manage.py migrate I get the same errors as @Tehniels2000. Any ETA for a fix for this problem? |
Currently working on support for latest Netbox version. |
Excellent. Thank you for the letting us know. |
Hello, sorry to push this, but is there any ETA? |
Currently working on it, on my test env everything is going fine. You guys can already test it. But I'm improving testing and corner cases, as it's not easy to predict all Proxmox environments. |
I would like to also note that although I love the project and its function, I do it as best-effort and have no return. I'm really glad the amount of people that use it, but I ask for some patience, if possible. |
Thank you for all your work on this, Emerson.
How can I get access to test the update that supports 4.x?
…________________________________
From: Emerson Felipe ***@***.***>
Sent: October 11, 2024 11:30 AM
To: netdevopsbr/netbox-proxbox ***@***.***>
Cc: Paul Siess ***@***.***>; Comment ***@***.***>
Subject: Re: [netdevopsbr/netbox-proxbox] Support for netbox 4.x (Issue #176)
Currently working on it, on my test env everything is going fine. You guys can already test it. But I'm improving testing and corner cases, as it's not easy to predict all Proxmox environments.
—
Reply to this email directly, view it on GitHub<#176 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABWEE446ILQX5JVR2S2RDRDZ27VINAVCNFSM6AAAAABHR3Q4KOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBXGY2TIOBQGE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hello,
But based on Do you have any Ideas what I'm doing wrong? |
Hi @spacecodeit could you please the last commits and confirm that fastapi is installed on Netbox Virtual Venv (/opt/netbox/venv)? Also, now on Proxbox plugin homepage, there is connection status to the services and log messages on the bottom, as you click on |
Hi @psiess, you just need to pull the |
Sorry for the newbie question. How do I pull the develop branch? I cloned the repository and can see the branches git branch -a
...but I can't figure out how to pull the develop branch. I tried git clone develop and git pull develop but neither work. |
I think you already switched to |
You are right @emersonfelipesp. I was able to install netbox-proxbox, but get an error right at the end of the installation: Installed /opt/netbox/venv/lib/python3.12/site-packages/fastapi_cli-0.0.5-py3.12.egg Can I downgrade starlette without messing up the rest of netbox? Or install a lower version alongside the 0.41.0? |
I'm currently using Yo can try this version with: |
@psiess try using the
Let me now if it works! |
I actually had to use |
Do I need to re-install after the new pull? |
@psiess I'm not sure, but would be good. |
I also want to be sure I'm doing this right. I currently go into /opt/netbox/netbox/netbox-proxbox and do a git pull to get the latest. Then, in /opt/netbox I execute ./update.sh with netbox-proxbox in the local_requirements file. I'm not sure it's working because Netbox doesn't start with the plugin activated. If I remove netbox_proxbox from the configuration.py file that Netbox will start. Is there a different way I should be doing that? |
Hi @troycarpenter, could you se Netbox logs? I don't get why it didn't work. I'm putting a lot of effort on Docs and Proxbox Plugin GUI so that User knows exactly what is going on. But for now, I'll need some help from you guys to find the bugs. |
I have tried all the ways I've found online to get Netbox to log to a file, but nothing has worked for me. It's gone as far as creating the log file, but nothing is ever logged there. In configuration.py, I have this:
That logging section is now a frankenstien based on a few websites. |
I know I am late to this party, but I am also a bit stuck. I have an almost fresh 4.1.6 install of Netbox and I am trying to install proxbox but failing. Not a git installation: I downloaded the tar.gz.
|
I'm running into a versioning problem when attempting to run python3 setup.py develop. Here is the error: error: httpcore 1.0.7 is installed but httpcore<0.14.0,>=0.13.3 is required by {'httpx'} Environment: |
This should do it: |
Thank @hoyohayo. I made the change and now I have a different error: error: httpcore 0.13.7 is installed but httpcore==1.* is required by {'httpx'} How httpcore version changed is beyond me. I didn't touch it. Any suggestions? |
Nevermind. I got past that problem. Working on configuration.py settings now. |
@emersonfelipesp I'm showing the same result as others in the web GUI. The GUI for me reports no errors, but also provides no actionable data. When the FastAPI was not connecting I was getting the big red bar alerting as such, as soon as that was resolved it went away but, still no updates in the GUI. From the CLI I get good data if I curl directly;
So fastAPI has access, but the GUI shows unknown; |
Hi @mgob could you please send me the full screen print of your GUI page? On this example, all the RED fields are from static configuration located at Netbox I also would like to now if at the bottom of the page, is there any log messages showing, like this: |
You are just a hero, I'm doing exactly the changes you did as you can see on my last commits. I promise to solve it until tomorrow and then I think it should work. |
I created a fresh new install on my lab of both Proxmox 8.3.0 and Netbox 4.1.7 and trying to get all things done with my own README.md instructions, as I make corrections to the code. But for now, if you guys really want to use it, will be necessary to make all the HTTPS/WSS changes @ctothelew did or just run it totally insecure, with Django In the future, I can guarantee that both ends (Netbox and Proxbox Backend serve) will need to run securely, so unfortunaly the installation process will get harder, but I also want to make as much as automations I can to minimize the effort. For now, there's no way to make the plugin "plug and play", but it is my wish to make the installation easy and all done through GUI. Finally, I would like to really thank you guys for collaborating with code and test. |
I have followed the updated instructions in the README and unfortunately, I am still in the same place. No errors but also no information. I also made a domain in NGINX Proxy Manager for proxbox.domain.tld using HTTPS protocol and port 8800. I ran the service and manual server with the same result. When using Netbox, I am getting no connection logs, but when manually going to proxbox.domain.tld in a browser, I am getting connection logs and the following:
Config:
|
You'll need to get a valid cert on the host that's running proxbox, then modify the proxbox.service file in /etc/systemd/system to append the --ssl-keyfile and --ssl-certfile variables for the cert so uvicorn is able to accept wss connections. I originally tried to route that through nginx as well, but couldn't get it to work.
I also had to modify the CORS middleware origins in main.py to add "https://my.fqdn.com" since it's what was making the calls to fastapi.
…________________________________
From: LilTrublMakr ***@***.***>
Sent: Friday, November 22, 2024 7:16:55 PM
To: netdevopsbr/netbox-proxbox ***@***.***>
Cc: Chuck Lewis ***@***.***>; Mention ***@***.***>
Subject: Re: [netdevopsbr/netbox-proxbox] Support for netbox 4.x (Issue #176)
I have followed the updated instructions in the README and unfortunately, I am still in the same place. No errors but also no information. I also made a domain in NGINX Proxy Manager for proxbox.domain.tld using HTTPS protocol and port 8800. I ran the service and manual server with the same result. When using Netbox, I am getting no connection logs, but when manually going to proxbox.domain.tld in a browser, I am getting connection logs and the following:
{"message":"Proxbox Backend made in FastAPI framework","proxbox":{"github":"https://github.com/netdevopsbr/netbox-proxbox","docs":"https://docs.netbox.dev.br"},"fastapi":{"github":"https://github.com/tiangolo/fastapi","website":"https://fastapi.tiangolo.com/","reason":"FastAPI was chosen because of performance and reliabilty."}}
Config:
"netbox_proxbox": {
"proxmox": {
"domain": "192.168.42.201",
"http_port": "8006",
"user": ***@***.***",
"token": {
"name": "proxbox",
"value": "nope"
},
"ssl": false
},
"netbox": {
"domain": "netbox.domain.tld",
"http_port": 8001,
"token": "nope",
"ssl": false,
"settings": {
"virtualmachine_role_id": 0,
"node_role_id": 0,
"site_id": 0
}
},
"fastapi": {
"uvicorn_host": "proxbox.domain.tld",
"uvicorn_port": 8800
}
},
—
Reply to this email directly, view it on GitHub<#176 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BGKT37DSVW4OQ53S7LPB5WD2B7JP7AVCNFSM6AAAAABHR3Q4KOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJVGE3TSMZXHE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I've had a little more time to play around with this. Full update stops at Looking at the logs during the import I see this (I've edited them for brevity)
|
Hi @ctothelew I was able to reuse Netbox certificates at Uvicorn and adjusting CORS, it worked fine. Now I'm looking at corner cases like yours
Fresh new install with latest Proxmox and Netbox versions working with last develop commit using SSL (self-signed) by default: |
I don't know if this is related to the connection problems, but I am also getting a "Mixed Content" warning in the web console: |
It should be solved at latest commits, this problem is because Netbox is acting as HTTPS Client and requesting to HTTP Server (FastAPI backend), then rejecting it because the server-side is insecure. But using the new OBS: Don't forget to use |
@emersonfelipesp I wouldn't be surprised if my issues were because of my netbox instance. It's a clone of our production instance that I wanted to upgrade to netbox 4, and attempt to get this plugin working on it, before attempting it in production. I haven't had time to mess around any further...so if you have any ideas for things to try, let me know. I'm game to try anything, since it's just a test at this point. Thanks for your hard work and help! |
For now, if you undo the changes you did and follow the new README instructions on get the plugin working, it should work. But it will still probably stops at your manufacturer problem, but I'm also checking the reason why. Thank you for your patience and willing to help! |
In the future, I plan to make my own async "NETBOX DIODE" solution and improve a lot data-validation, so user can get a more detailed error. |
Idk. I am still having a hell of a time getting to where you guys are. I have even spun up a fresh instance of Netbox and fresh everything with following the README explicitly. When going to the page, I get CORS errors when using the IP address of the machine in the fastapi section of settings (even with CORS_ORIGIN_WHITELIST and CSRF_TRUSTED_ORIGINS set). If I try the domain, localhost, or 127.0.0.1, I get connection refused errors. I may just need to tap out until V4 is officially supported... |
Hi @LilTrublMakr I will add a way to dinamically add Netbox possible origins dynamically based on |
I have some kind of regression. I did a git pull and recompiled / installed (and I think I changed everything for https including the proxbox.service file). The last line of the error I'm getting is this:
|
Hi @troycarpenter, thank your for your feedback. I'm still coding this part. |
Thanks. The latest updates with git pull seems to have fixed the error. Now working to get all the processes talking again. |
Ok, got all the services showing up as "successful" in the Netbox GUI. I hit the Full Update button and got this in the log box:
HOWEVER, I don't exactly know what happened. I don't see any new VMs created (that is, new ones in Proxmox but were not in Netbox). And I can't tell if existing entities were changed in Netbox to match Proxmox. I do find this error in the log:
|
Hi @troycarpenter I will review the logs you provided as soon as possible and I'll back with a solution. Thank you! |
@troycarpenter trying to solve it, I'm improving a bit the GUI to be more informative other than just logs. When clicking to Sync Virtual Machines, a new table is created and populated as Proxbox updates Netbox. The image below is the first version, but I will add styling and links (like VM Name will link to the VM on Netbox directly) |
@troycarpenter this branch isn't working yet, but I will fix it this weekend. I got no time this past week to work on the plugin, but I think next days will be better. |
No matter what I do I can't get past this error. tried v4.1.9 and v4.1.0
This could be related to this unresolved pull request fastapi pull request 9928 I also saw this in pydantic Issue 7669
|
There were changes in netbox 3.7 which were further deprecated in 4.0 Please see Migrating Your Plugin to NetBox v4.0 for porting instructions to make the plugin compatible with 4.x
The text was updated successfully, but these errors were encountered: