FOSSBilling / ISPConfig-3

A community maintained ISPConfig 3 server manager for FOSSBilling
Apache License 2.0
2 stars 1 forks source link

[Bug] #3

Open sevnodes opened 3 weeks ago

sevnodes commented 3 weeks ago

Hello, I'm not one to comment or anything. But this time I'm going to do it so that this plugin can be improved further. I can't synchronize the data to my server with ISPConfig it returns that error.

The plugin is very good, what fails is that and that when a user is created, it does not create a user, it creates the site without associating it with the user.

image

jsonkenyon commented 3 weeks ago

ISPConfig3 doesn't have an API endpoint to actually sync the account, so this is expected. However, it creating the website, but not the user is an issue. In my testing it was also making the user account, did you by chance get any error when the account was being created?

sevnodes commented 3 weeks ago

As far as I know, I have not received any errors, only that it did not synchronize those things that I mentioned and that it causes problems when synchronizing, that it basically does not synchronize. What I would like above all is for everything to be synchronized, both the limitations and everything, to create the user account and when I suspend someone for non-payment, then if I suspend in FOSSBilling, then the account and the site in ISPConfig will be suspended.

jsonkenyon commented 3 weeks ago

I’ll take another peek tomorrow when I get off work, see if I can find any issues. Also I’ll take a look at the syncing, we might be able to do something for it. I was planning on updating the code to clean it up also so I’ll use this as a chance to also do that

sevnodes commented 3 weeks ago

Perfect, I'm sure you can improve it and clean up the code. I hardly understand PHP otherwise it would help you. Anything testing or whatever, let me know and I'll try it. I will wait for your response.

jsonkenyon commented 3 weeks ago

Wasn’t able to get to this today, having some car troubles and been working on that after work, and should be fully fixed tomorrow. So I’ll have to push this out until Wednesday as long as I’m able to fix my car.

sevnodes commented 3 weeks ago

No rush, take your time without problem 💪

jsonkenyon commented 2 weeks ago

I conducted some testing today and was unable to replicate the issue with the client/user not being created. The user was successfully created and linked to the corresponding website. However, this does highlight areas where the process could be further optimized.

If you're experiencing an issue where the user isn't being created on your end, it's possible that the problem lies with the permissions of the API user you're using. Could you please share a screenshot of those permissions for further review?

From my perspective, the process should ensure that the user/client is successfully created. If the creation fails, the process should halt and trigger an error. I will proceed with making the necessary updates to address this.

sevnodes commented 2 weeks ago

image

image

Now what I told you is working for me but it has not been assigned what I have delimited in the space template and that has been made unlimited

sevnodes commented 2 weeks ago

image

But it won't let me synchronize from FossBilling so that it applies that it only has 10GB, not unlimited

sevnodes commented 2 weeks ago

image

jsonkenyon commented 2 weeks ago

Thank you for the update. I understand the current limitations with account syncing, and while this feature isn't supported at the moment, I will explore alternative solutions to enable syncing.

Regarding your comment about user creation — "When a user is created, it does not create a user; it creates the site without associating it with the user" — could you clarify the specifics of this process? Is the module creating the website but not the user account, and failing to link it in ISPConfig3? Or is this issue more closely related to the account syncing challenge?

Your insights would be helpful for better understanding and resolving the situation.

sevnodes commented 2 weeks ago

The rest is all correct, I have already gotten it to work. What would be missing is that when the user is created it does not have the established limitations. And also if I want the user to create more sites without having to purchase the plan more times, how do I do it?

sevnodes commented 2 weeks ago

The thing is that multidomain is allowed in my plan. And I need to be able to host more domains on the same plan.

jsonkenyon commented 2 weeks ago

Thank you for the clarification—this makes much more sense now. I had some questions about these settings and was hoping for insight from someone more familiar with ISPConfig3.

It appears the issue stems from the createClient function. I was using the example data provided by ISPConfig3, which sets certain values to -1 (indicating unlimited). I will update this in the coding to pull it from FOSSBilling, which should resolve the issue.

sevnodes commented 2 weeks ago

Perfect, I'm glad I was able to clarify

jsonkenyon commented 2 weeks ago

The changes made should address the limits issue and apply them correctly. Could you please test it at your earliest convenience?

Link to code

I will continue to consider potential solutions for the syncing issue and explore options to resolve it.

sevnodes commented 2 weeks ago

I'll try it and let you know, thank you.

sevnodes commented 2 weeks ago

image It works but the ideal is to add that you can modify all the fields of the limiting template. So that if you establish that 3 CRON tasks can be done, then there are only three tasks, not unlimited.

jsonkenyon commented 2 weeks ago

This would need to be specified in the "Hosting Plan Additional Parameters" section.

Currently, FOSSBilling does not have a built-in setting to define the number of cron jobs. (That I know of)

I'll update the code soon to support custom values, and update the documentation. Taking my daughter out to a theme park and I'll get this done when I get back

So in other words it would be something like the following that we have now (except it would be for crons, etc):

Custom Package Values vat_id - Default: NULL web_php_options - Default: no,fast-cgi,cgi,mod,suphp,php-fpm (Not sure if all these options exist, I think only fast-cgi & php-fpm exists. Please LMK if you know.) limit_shell_user - Default: 1 ssh_chroot - Default: no,jailkit,ssh-chroot language - Default: en pm_process_idle_timeout - Default: 30 pm_max_requests - Default: 30

jsonkenyon commented 2 weeks ago

I've completed the task, and everything is ready to go. You now have the ability to configure additional custom package values. However, please note that it is not necessary to configure all of them if you are fine with leaving them set to unlimited (-1). The only exception is the limit_cron_frequency, which will default to 5 minutes if not specified. Below is a list of the custom package values available for adjusting the limits that FOSSBilling does not provide by default.

You can use the following repository to test these changes. If everything looks good, I’ll go ahead and open the pull request for review and merge.

Thank you for your valuable feedback!

sevnodes commented 2 weeks ago

Perfect, thank you very much. Then at night I try it. I'm from Spain and right now you catch me outside. Tonight I'll try and tell you.

jsonkenyon commented 2 hours ago

Wanted to follow up here, did you have a chance to test?