Drop Sendmail Support#10870
Conversation
| @@ -0,0 +1,5 @@ | |||
| class RemoveSendmailSettings < ActiveRecord::Migration[7.0] | |||
| def change | |||
There was a problem hiding this comment.
It may not matter too much, but should this be up with an empty down? Not that we do rollbacks often, but also wondering out of principle how that works.
There was a problem hiding this comment.
i can do that, also looking at what rails has to say about it. https://guides.rubyonrails.org/active_record_migrations.html#throwing-an-error-to-prevent-reverts mentions that
Sometimes your migration will do something which is just plain irreversible; for example, it might destroy some data.
In such cases, you can raise ActiveRecord::IrreversibleMigration in your down block.
reading this i am leaning to add ActiveRecord::IrreversibleMigration in down?
There was a problem hiding this comment.
In this case I'd argue it is reversible: Foreman will find a new default and work, but you're right it's a bit of an edge case.
There was a problem hiding this comment.
It is true that it is irreversible in the true that we remove data and we have no way of getting it back. At the same time, if we have a blank down, it would allow people to "rollback" the migration (which would be a no-op), checkout older version and go on about their day. If we raise, this wouldn't be impossible, but it would become much more involved.
There was a problem hiding this comment.
Sorry, but i did not got Foreman will find a new default and work this part. I usually see that any data deletion related migrations(be it via active record or raw sql) is something that should not be reverted(there are very less chances it need to be reversible)
There was a problem hiding this comment.
Ok , so i see that having empty down makes it reversible but its no-op. but then also its a false posiitive, but i would not might having a empty down?
6bb0724 to
99f17f1
Compare
99f17f1 to
e318685
Compare
|
In Satellite we saw that the majority of users has notifications enabled, but only a much smaller number has modified their settings to use SMTP. I suspect (but we have no telemetry so it's a guess) the same holds true for Foreman. Before we merge this we should think about a smoother migration. |
|
Thinking out loud:- |
|
@adamruzicka have you thought about the migration? |
|
There isn't all that much we can do, is there? We can't really take data from an unknown external system and configure it on our end.
It allows us to simplify the codebase and avoid some issues from ever happening. New deployments will arguably end up in better shape (either explicitly configured on unconfigured), but they won't be in the in-between state they do now (sendmail configured, but postfix not enabled so "test email" succeeds but the emails never really go out) |
If today the sendmail binary is used, is using |
That seems to work (as in, mail gets accepted) with default settings both with postfix on EL9 and with exim4 on debian, but due to the best-effort nature of such a migration, I'd still be worried about two things:
Thinking a bit further ahead, we'll also have to figure out what to do with smtp server being set to |
|
Ok so based on the discussion above, here are my observation:- Today with sendmail(default mail delivery method), the mails are dependent on local postfix MTA on EL9 to deliver mail, with postfix being stopped/inactive all mails stay in the queue( I have tested the SMTP with When postfix is not running:
When postfix is running:
So i think
This is exactly what happens with sendmail today when postfix is not running.
That's a fair concern but at the same time leaving it unconfigured leaves user enviorments broken for mail feature. |
IMHO a release note should cover that.
In the beginning we'll deploy with host networking where I'd expect that to work. theforeman/foremanctl#403 may change that, so it's good to keep an eye out. |
|
@ekohl @adamruzicka , should we skip default to |
I know I had some objections against that, but seeing we don't really have any alternatives, I wouldn't dismiss it. Would we make it a new global default or just a default for those who'd be migrated away from smtp? |
You mean migrated away from sendmail? i think it makes sense to only set |
Eh, yes, sorry.
I didn't mean to override existing smtp configuration. What I meant was changing the default value for |
|
Ah, sorry, i took it in context of updating existing value of smtp_address, yeah changing the default value for smtp_address in the settings registry here, make perfect sense to me. |
a0bde0c to
e3de8a9
Compare
e3de8a9 to
6d49425
Compare
No description provided.